Package com.openkm.sdk4j.util
Class ISO8601
- java.lang.Object
-
- com.openkm.sdk4j.util.ISO8601
-
public class ISO8601 extends Object
TheISO8601utility class provides helper methods to deal with date/time formatting using a specific ISO8601-compliant format (see ISO 8601). The currently supported format is:YYYY-MM-DDThh:mm:ss.SSSTZD
where:MM = two-digit month (01=January, etc.) DD = two-digit day of month (01 through 31) hh = two digits of hour (00 through 23) (am/pm NOT allowed) mm = two digits of minute (00 through 59) ss = two digits of second (00 through 59) SSS = three digits of milliseconds (000 through 999) TZD = time zone designator, Z for Zulu (i.e. UTC) or an offset from UTC in the form of +hh:mm or -hh:mmSee also http://www.pelagodesign.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
-
-
Constructor Summary
Constructors Constructor Description ISO8601()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringformatBasic(Calendar value)Format date with format "yyyyMMddHHmmss"static StringformatExtended(Calendar value)Format date with format "YYYY-MM-DDThh:mm:ss.SSSTZD"static booleanisExtended(String value)Check if the value is a valid ISO8601 extended datestatic CalendarparseBasic(String value)Parse string date in format "yyyyMMddHHmmss"static CalendarparseExtended(String value)Parse string date in format "YYYY-MM-DDThh:mm:ss.SSSTZD"
-
-
-
Method Detail
-
isExtended
public static boolean isExtended(String value)
Check if the value is a valid ISO8601 extended date
-
parseExtended
public static Calendar parseExtended(String value)
Parse string date in format "YYYY-MM-DDThh:mm:ss.SSSTZD"
-
formatExtended
public static String formatExtended(Calendar value)
Format date with format "YYYY-MM-DDThh:mm:ss.SSSTZD"
-
parseBasic
public static Calendar parseBasic(String value)
Parse string date in format "yyyyMMddHHmmss"
-
-