[Zope-CMF] DateTime support for Norwegian dateformat? (offtopic)

jkpikifi jkp@iki.fi
Fri, 21 Dec 2001 12:57:11 -0000


Well, the ISO format is accepted in Finland as an international
standard, and some organizations have tried to get it adopted for
daily use.  And we did try telling the customer that, when the
application we wrote was using the ISO format.  But the customer said
that they want nothing to do with silly formats like that, they want
the normal "dd.mm.yyyy" format.  And as we all know, the customer is
always right, thus the patch to DateTime.py.

So, as long as we have this anarchy on the date formats and there
isn't a global police to report deviations from the ISO standard to so
they can be bombed out of existence or something (that extension to
the cybercrime treaty was not yet approved as I heard it, maybe next
year ;-), I think the reasonable thing to do is to try to make date
input work with the formats people actually use, instead of trying to
make people conform to how an international standards organization
wants them to write dates.  And as I understand it, the philosophy of
DateTime() is just that, it does try to understand any formats people
might offer to it.

As for date output, locale-specific formats can be used already. 
Perhaps the right thing to do would be to use locale settings also 
for date input, to differentiate for example between GB/FI (dd/mm) and
US (mm/dd?) formats?

Jyrki


--- In zopeCMF@y..., seb bacon <seb@j...> wrote:
> IMO the ISO 8605 format (YYYY-MM-DD) is the only sensible default:
> 
>  - it is an international standard
>  - it's unambigious (hmm, ok, *less* ambiguous)
>  - it sorts nicely as a string
> 
> DateTime knows how to display and parse in this format.
> 
> seb
> 
> > I think I submitted the code to the bug collector for this change.
> > 
> > --- In zopeCMF@y..., Joachim Schmitz <js@a...> wrote:
> > > but beware of a bug-feature.
> > > 
> > > 
> > > DateTime('13.1.2001') --> results correctly to 13-Jan-2001
> > > but
> > > DateTime('12.1.2001') --> results to 1-Dec-2001
> > > 
> > > and so do all others where the daydigits result in a valid month
!!!!!
> > > 
> > > 
> > > --On Donnerstag, Dezember 20, 2001 14:13:59 -0500 Andreas Jung 
> > > <andreas@z...> wrote:
> > > 
> > > > Zopes DateTime objects should be able to parse formats
> > > > like 'dd.mm.yy' and 'dd.mm.YYYY' (tested and working
> > > > with Zope 2.5 (and earlier version)).