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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RFC3339Date
public RFC3339Date()
parse3339Date
public static long parse3339Date(String s)
- Parse the date
- Parameters:
s
- non-null
- Returns:
- -1 on failure
to3339Date
public static String to3339Date(long t)
- Format is "yyyy-MM-ddTHH:mm:ssZ"