org.apache.wicket.util.time.Time.toDateString()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.apache.wicket.util.time.Time.toDateString()方法的一些代码示例,展示了Time.toDateString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Time.toDateString()方法的具体详情如下:
包路径:org.apache.wicket.util.time.Time
类名称:Time
方法名:toDateString

Time.toDateString介绍

[英]Converts this Time value to a date String using the date formatter 'yyyy.MM.dd'.
[中]使用日期格式化程序'yyyy'将此Time值转换为日期String。嗯。dd'。

代码示例

代码示例来源:origin: org.apache.wicket/wicket-util

/**
 * Converts this <code>Time</code> value to a date <code>String</code> using the date formatter
 * 'yyyy.MM.dd'.
 * 
 * @return the date string
 */
public String toDateString()
{
  return toDateString(localtime);
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Converts this <code>Time</code> value to a date <code>String</code> using the date formatter
 * 'yyyy.MM.dd'.
 * 
 * @return the date string
 */
public String toDateString()
{
  return toDateString(localtime);
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Converts this <code>Time</code> value to a date <code>String</code> using the date
 * formatter 'yyyy.MM.dd'.
 *
 * @return the date string
 */
public String toDateString()
{
  return toDateString(localtime);
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Converts this <code>Time</code> value to a <code>String</code> suitable for use in a file
 * system name.
 *
 * @return this <code>Time</code> value as a formatted <code>String</code>
 */
public String toString()
{
  return toDateString() + "-" + toTimeString();
}

代码示例来源:origin: org.apache.wicket/wicket-util

/**
 * Converts this <code>Time</code> value to a <code>String</code> suitable for use in a file
 * system name.
 * 
 * @return this <code>Time</code> value as a formatted <code>String</code>
 */
@Override
public String toString()
{
  return toDateString() + "-" + toTimeString();
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Converts this <code>Time</code> value to a <code>String</code> suitable for use in a file
 * system name.
 * 
 * @return this <code>Time</code> value as a formatted <code>String</code>
 */
@Override
public String toString()
{
  return toDateString() + "-" + toTimeString();
}

代码示例来源:origin: apache/wicket

/**
   * Gets debug info as a string for the given cookie.
   *
   * @param cookie
   *            the cookie to debug.
   * @return a string that represents the internals of the cookie.
   */
  private String cookieToDebugString(final Cookie cookie)
  {
    return "[Cookie " + " name = " + cookie.getName() + ", value = " + cookie.getValue() +
      ", domain = " + cookie.getDomain() + ", path = " + cookie.getPath() + ", maxAge = " +
      Time.millis(cookie.getMaxAge()).toDateString() + "(" + cookie.getMaxAge() + ")" + "]";
  }
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Gets debug info as a string for the given cookie.
 * 
 * @param cookie
 *            the cookie to debug.
 * @return a string that represents the internals of the cookie.
 */
private String cookieToDebugString(final Cookie cookie)
{
  return "[Cookie " + " name = " + cookie.getName() + ", value = " + cookie.getValue() +
    ", domain = " + cookie.getDomain() + ", path = " + cookie.getPath() + ", maxAge = " +
    Time.valueOf(cookie.getMaxAge()).toDateString() + "(" + cookie.getMaxAge() + ")" + "]";
}

代码示例来源:origin: org.apache.wicket/wicket-core

/**
   * Gets debug info as a string for the given cookie.
   *
   * @param cookie
   *            the cookie to debug.
   * @return a string that represents the internals of the cookie.
   */
  private String cookieToDebugString(final Cookie cookie)
  {
    return "[Cookie " + " name = " + cookie.getName() + ", value = " + cookie.getValue() +
      ", domain = " + cookie.getDomain() + ", path = " + cookie.getPath() + ", maxAge = " +
      Time.millis(cookie.getMaxAge()).toDateString() + "(" + cookie.getMaxAge() + ")" + "]";
  }
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
   * Gets debug info as a string for the given cookie.
   * 
   * @param cookie
   *            the cookie to debug.
   * @return a string that represents the internals of the cookie.
   */
  private String cookieToDebugString(final Cookie cookie)
  {
    return "[Cookie " + " name = " + cookie.getName() + ", value = " + cookie.getValue() +
      ", domain = " + cookie.getDomain() + ", path = " + cookie.getPath() + ", maxAge = " +
      Time.valueOf(cookie.getMaxAge()).toDateString() + "(" + cookie.getMaxAge() + ")" + "]";
  }
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-plugins

/**
 * @see org.apache.wicket.IRequestTarget#respond(org.apache.wicket.RequestCycle)
 */
public void respond(RequestCycle requestCycle) {
  final Application app = Application.get();
  // Determine encoding
  final String encoding = app.getRequestCycleSettings().getResponseRequestEncoding();
  // Set content type based on markup type for page
  final WebResponse response = (WebResponse) requestCycle.getResponse();
  response.setCharacterEncoding(encoding);
  response.setContentType("text/plain; charset=" + encoding);
  // Make sure it is not cached by a client
  response.setHeader("Expires", Time.now().subtract(Duration.minutes(1)).toDateString());
  response.setHeader("Cache-Control", "no-cache, must-revalidate");
  response.setHeader("Pragma", "no-cache");
  response.setLastModifiedTime(Time.now());
  // set filename
  response.setAttachmentHeader(getFilename());
  response.write(getContent());
}

相关文章