Package network.oxalis.as2.util
Enum As2DateUtil
- java.lang.Object
-
- java.lang.Enum<As2DateUtil>
-
- network.oxalis.as2.util.As2DateUtil
-
- All Implemented Interfaces:
Serializable,Comparable<As2DateUtil>
public enum As2DateUtil extends Enum<As2DateUtil>
Ensures that all date time objects are parsed and formatted according to the specifications in RFC4130.RFC-4130 references RFC-2045, which references RFC-1123, which references good old RFC-822.
date-time = [ day "," ] date time ; dd mm yy ; hh:mm:ss zzz day = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" date = 1*2DIGIT month 4DIGIT ; day month year(4 digits) ; e.g. 20 Jun 82 month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" time = hour zone ; ANSI and Military hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT] ; 00:00:00 - 23:59:59 zone = "UT" / "GMT" ; Universal Time ; North American : UT / "EST" / "EDT" ; Eastern: - 5/ - 4 / "CST" / "CDT" ; Central: - 6/ - 5 / "MST" / "MDT" ; Mountain: - 7/ - 6 / "PST" / "PDT" ; Pacific: - 8/ - 7 / 1ALPHA ; Military: Z = UT; ; A:-1; (J not used) ; M:-12; N:+1; Y:+12 / ( ("+" / "-") 4DIGIT ) ; Local differential ; hours+min. (HHMM)- Author:
- steinar, erlend
- See Also:
- "RFC-4130", "RFC-2045", "RFC-1123", "RFC-822"
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(Date d)Dateparse(String s)static As2DateUtilvalueOf(String name)Returns the enum constant of this type with the specified name.static As2DateUtil[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RFC822
public static final As2DateUtil RFC822
-
ISO8601
public static final As2DateUtil ISO8601
-
-
Method Detail
-
values
public static As2DateUtil[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (As2DateUtil c : As2DateUtil.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static As2DateUtil valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-