Ben Bennett [EMAIL PROTECTED] schrieb/wrote:
There is a related question about what I should _really_ be returning
for the reduced formats. For example, the format matches a year,
right now I return Jan 1st of the year, or YY gives a century, so if
given 20 I return Jan 1st, 2000. Does
Dave Rolsky schreef:
Here's the thing. Yes, the object would contain more precision than the
original data, _but_ presumably if you are only exchanging year and
month data, then you will only look at the year and month of the returned
object.
It's really hard for me to think of a case
Dave Rolsky schreef:
It's really hard for me to think of a case where you would not know the
expected precision in advance.
It's usually true that you do know the precision in advance (not always) but not ALL
handling of time involves knowing the year.
On Sun, 22 Jun 2003, Eugene van der
On Sun, Jun 22, 2003 at 04:47:42AM +0200, Eugene van der Pijll wrote:
If YY really is the century, you should probably return Jan 1st, 1901
when given 20...
The example given in the spec says that given 12 April 1985 YY gives
19. So they are being a little loose with the word century...
On Sunday, June 22, 2003 Dave Rolsky wrote:
On Sat, 21 Jun 2003, Bruce Van Allen wrote:
The point of DT::Format::XXX is parsing and formatting:
- to return a DT object if given an XXX-formatted date/time string; and
- to return an XXX-formatted string from a DT object.
Well, the formats can
On Sunday, June 22, 2003 Eugene van der Pijll wrote:
Bruce Van Allen schreef:
From a string in the form MM, the DT::F::ISO8601 parser
should return a DT object identical to the DateTime object
instantiated from
$dt = DateTime-new(
year = 2003,
month = 6.
);