As discussed at:
Ruby Date and Time classes do not support the following legal timestamp
argument out of range
=> #<Date: 2010-01-01 ((2455198j,0s,0n),+0s,2299161j)>
I believe that the two classes date and less importantly time, can not
support a notion of a temporal instance with less absoluteness than a
day or perhaps second. For example a month in a year defaults to the
first minute of the first day of a month.
Is there another class that may be more compatible with the following
definition from http://www.w3.org/TR/NOTE-datetime ?
Different standards may need different levels of granularity in the date
and time, so this profile defines six levels. Standards that reference
this profile should specify one or more of these granularities. If a
given standard allows more than one granularity, it should specify the
meaning of the dates and times with reduced precision, for example, the
result of comparing two dates with different precisions.
The formats are as follows. Exactly the components shown here must be
present, with exactly this punctuation. Note that the “T” appears
literally in the string, to indicate the beginning of the time element,
as specified in ISO 8601.
YYYY (eg 1997)
Year and month:
YYYY-MM (eg 1997-07)
YYYY-MM-DD (eg 1997-07-16)
Complete date plus hours and minutes:
YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
Complete date plus hours, minutes and seconds:
YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
Complete date plus hours, minutes, seconds and a decimal fraction of
YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)