@@ -24,10 +24,9 @@ public class ISO8601Utils {
24
24
*/
25
25
private static final TimeZone TIMEZONE_GMT = TimeZone .getTimeZone (GMT_ID );
26
26
27
- /*
28
- * /********************************************************** /* Static factories
29
- * /**********************************************************
30
- */
27
+ /* ********************************************************* */
28
+ /* Static factories */
29
+ /* ********************************************************* */
31
30
32
31
/**
33
32
* Accessor for static GMT timezone instance.
@@ -36,10 +35,9 @@ public static TimeZone timeZoneGMT() {
36
35
return TIMEZONE_GMT ;
37
36
}
38
37
39
- /*
40
- * /********************************************************** /* Formatting
41
- * /**********************************************************
42
- */
38
+ /* ********************************************************* */
39
+ /* Formatting */
40
+ /* ********************************************************* */
43
41
44
42
/**
45
43
* Format a date into 'yyyy-MM-ddThh:mm:ssZ' (GMT timezone, no milliseconds precision)
@@ -111,13 +109,13 @@ public static String format(Date date, boolean millis, TimeZone tz) {
111
109
return formatted .toString ();
112
110
}
113
111
114
- /*
115
- * /********************************************************** /* Parsing
116
- * /**********************************************************
117
- */
112
+ /* ********************************************************* */
113
+ /* Parsing */
114
+ /* ********************************************************* */
118
115
119
116
/**
120
- * Parse a date from ISO-8601 formatted string. It expects a format yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]
117
+ * Parse a date from ISO-8601 formatted string. It expects a format
118
+ * [yyyy-MM-dd|yyyyMMdd][T(hh:mm[:ss[.sss]]|hhmm[ss[.sss]])]?[Z|[+-]hh:mm]]
121
119
*
122
120
* @param date ISO string to parse in the appropriate format.
123
121
* @param pos The position to start parsing from, updated to where parsing stopped.
0 commit comments