Hi, Juerd wrote: > Ingo Blechschmidt skribis 2005-07-05 20:08 (+0200): >> FWIW, I agree, but I'd like to propose standard overloadings: >> say ~$time; # "Di 05 Jul 2005 20:01:42 CEST" > > Or perhaps not. In fact, rather not. Please let stringification be the > ISO standard, and otherwise certainly sortable: year first, then > month, then mday. > > 2005-07-05T20:01:42+0200
WRT to sorting: The Date/Time/whatever class should overload &infix:«<=>», so sorting really works -- if you sort those ISO strings, you'll probably get wrong results, as the timezone diff isn't taken into account. I don't have a strong opinion on the default format of the stringification. Could/should we use .as for this, to leave the choice to the programmer? say time.as("%H:%M:%S"); # 20:26:36 Note though that it's inconsistent: say "hi".as("%H:%M:%S"); # error say time.as("%H:%M:%S"); # works --Ingo -- Linux, the choice of a GNU | "The future is here. It's just not widely generation on a dual AMD | distributed yet." -- William Gibson Athlon! |