public class DateUtils extends Object
限定符和类型 | 字段和说明 |
---|---|
protected static org.joda.time.format.DateTimeFormatter |
alternateIso8601DateFormat
Alternate ISO 8601 format without fractional seconds
|
protected static org.joda.time.format.DateTimeFormatter |
iso8601DateFormat
ISO 8601 format
|
protected static org.joda.time.format.DateTimeFormatter |
rfc822DateFormat
RFC 822 format
|
构造器和说明 |
---|
DateUtils() |
限定符和类型 | 方法和说明 |
---|---|
static String |
formatISO8601Date(Date date)
Formats the specified date as an ISO 8601 string.
|
static String |
formatRFC822Date(Date date)
Formats the specified date as an RFC 822 string.
|
static Date |
parseISO8601Date(String dateString)
Parses the specified date string as an ISO 8601 date and returns the Date
object.
|
static Date |
parseRFC822Date(String dateString)
Parses the specified date string as an RFC 822 date and returns the Date object.
|
protected static final org.joda.time.format.DateTimeFormatter rfc822DateFormat
protected static final org.joda.time.format.DateTimeFormatter iso8601DateFormat
protected static final org.joda.time.format.DateTimeFormatter alternateIso8601DateFormat
public static String formatRFC822Date(Date date)
date
- The date to format.public static Date parseRFC822Date(String dateString)
dateString
- The date string to parse.public static String formatISO8601Date(Date date)
date
- The date to format.Copyright © 2019. All rights reserved.