org.autoplot.servlet.TimeRangeParser
Extract a clean Java code for parsing ISO8601 strings.
TimeRangeParser( )
iso8601duration
iso8601DurationPattern
main
main( java.lang.String[][] args ) → void
Parameters
args - a java.lang.String[]
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
parseISO8601Datum
parseISO8601Datum( String str, int[][] result, int lsd ) → int
ISO8601 datum parser. This does not support 2-digit years, which
were removed in ISO 8601:2004.
Parameters
str - a String
result - an int[]
lsd - an int
Returns:
an int
[search for examples]
[view on GitHub]
[view on old javadoc]
parseISO8601Duration
parseISO8601Duration( String stringIn ) → int[]
returns a 7 element array with [year,mon,day,hour,min,sec,nanos] or [-9999].
Parameters
stringIn - a String
Returns:
[year,mon,day,hour,min,sec,nanos]
[search for examples]
[view on GitHub]
[view on old javadoc]
parseISO8601Range
parseISO8601Range( String stringIn, int[][] result ) → int[]
returns the time found in an iso8601 string, or null. This supports
periods (durations) as in: 2007-03-01T13:00:00Z/P1Y2M10DT2H30M
Other examples:
2007-03-01T13:00:00Z/2008-05-11T15:30:00Z
2007-03-01T13:00:00Z/P1Y2M10DT2H30M
P1Y2M10DT2H30M/2008-05-11T15:30:00Z
2007-03-01T00:00Z/P1D
2012-100T02:00/03:45
http://en.wikipedia.org/wiki/ISO_8601#Time_intervals
Parameters
stringIn - a String
result - an int[]
Returns:
int[14] with [Y,M,D,H,M,S,NS,Y,M,D,H,M,S,NS]
[search for examples]
[view on GitHub]
[view on old javadoc]