类 DateUtils

java.lang.Object
com.baidu.mochow.util.DateUtils

public class DateUtils extends Object
Utilities for parsing and formatting dates.

Note that this class doesn't use static methods because of the synchronization issues with SimpleDateFormat. This lets synchronization be done on a per-object level, instead of on a per-class level.

  • 构造器详细资料

    • DateUtils

      public DateUtils()
  • 方法详细资料

    • formatAlternateIso8601Date

      public static String formatAlternateIso8601Date(Date date)
      Formats the specified date as an ISO 8601 string.
      参数:
      date - The date to format.
      返回:
      The ISO 8601 string representing the specified date.
    • formatRfc822Date

      public static String formatRfc822Date(Date date)
      Formats the specified date as an RFC 822 string.
      参数:
      date - The date to format.
      返回:
      The RFC 822 string representing the specified date.