Package net.i2p.router.news
Class RFC3339Date
java.lang.Object
net.i2p.router.news.RFC3339Date
public abstract class RFC3339Date extends Object
Adapted from net.i2p.router.util.RFC822Date.
This only supports parsing of the dates specified by Atom (RFC 4287)
and a couple of others.
In particular, 'T' is required, and either 'Z' or a numeric timezone offset is required,
unless there's no time fields at all.
The full variety of RFC 3339 (ISO 8601) dates is not supported by the parser,
but they could be added in the future.
See also: http://stackoverflow.com/questions/6038136/how-do-i-parse-rfc-3339-datetimes-with-java
- Since:
- 0.9.17
-
Constructor Summary
Constructors Constructor Description RFC3339Date()
-
Method Summary
Modifier and Type Method Description static long
parse3339Date(String s)
Parse the datestatic String
to3339Date(long t)
Format is "yyyy-MM-ddTHH:mm:ssZ"
-
Constructor Details
-
RFC3339Date
public RFC3339Date()
-
-
Method Details
-
parse3339Date
Parse the date- Parameters:
s
- non-null- Returns:
- -1 on failure
-
to3339Date
Format is "yyyy-MM-ddTHH:mm:ssZ"
-