[phobos] datetime review (new attempt at URL)

Steve Schveighoffer schveiguy at yahoo.com
Thu Oct 14 13:17:40 PDT 2010


----- Original Message ----

> From: Denis <2korden at gmail.com>
> On Thu, Oct 14, 2010 at 11:38 PM, Steve Schveighoffer
> <schveiguy at yahoo.com> wrote:
> > Can  we agree to print a
> > date/time out like this:
> >
> >  [mm/dd/yyyy] [hh:mm:ss.ffffffff]
> >
> > Where mm is month, dd is day,  yyyy is 4-digit year, hh is 24-hour hour, mm 
>is
> > minute, ss is second,  and ffffff is fractional seconds.
> >
> 
> This is actually very  locale-specific. E.g. here in Russia we use
> dd/mm/yyyy (I'm used to it and it  seems pretty logic - the order is
> ascending), and thus when I see 5/6/2010 I  always confuse if it's May,
> 6 or June,  5.

Yes, it is.  But at the end of the day, without including a gigantic locale 
library, we need to standardize on a simple way of printing dates and times for 
debugging (i.e. via toString).  My suggestion is simply to pick one and say 
"this is it, if you want something different, use a locale library".  I'd prefer 
it to be my locale, but as long as it's *something*, it should be fine.

What I was objecting to is the enormous amount of code inside the datetime libs 
that is focused on printing dates and times in all sorts of formats.  I think 
this is best left to another library.

-Steve



      


More information about the phobos mailing list