std.date proposal

John C johnch_atms at hotmail.com
Thu Mar 30 05:50:17 PST 2006


"Fredrik Olsson" <peylow at treyst.se> wrote in message 
news:e0g6r2$206b$1 at digitaldaemon.com...
> John C skrev:
>>> "M/D/Y" will stay I think, it is the US way, ambiguous or not, and there 
>>> is allot of code/people out there making this assumption. If I could 
>>> choose myself we would all go ISO :).
>>
>> Who are these people expecting dates to appear in US format, I wonder?
>>
>> A date library that has no notion of locales has no business making any 
>> region-specific assumptions and should just implement ISO8601. After all, 
>> that's what it's for.
>>
>> If you must support a common date format, it should be D/M/Y, which is 
>> used by the vast majority of countries and accepted internationally. 
>> http://en.wikipedia.org/wiki/Calendar_date
>>
>
> Ok, let me argue for my point, and they you argue why not :).
>
> I have chosen the implementation for one single reason; I do as the SQL99 
> standard does. Instead of inventing my own scheme I have chosen a scheme I 
> know, and is used by many.
>
> I could dumb it down, and greatly reduced code size, and only allow for 
> ISO 8601 formatting, but as I rewrote the PostgreSQL parser implementation 
> I deliberately kept the SQL way. Because it is a known standard, and 
> allows for some flexibility.

Those are fair points and I've been known to model code on other libraries 
myself (coming up with original APIs is hard). But it seems to me that 
you're copying a dubious decision made by its developers. No doubt I'm not 
exempt from that charge either.

>
> // Fredrik 





More information about the Digitalmars-d-announce mailing list