develooper Front page | perl.perl6.language | Postings from June 2005

Re: date and time formatting

Thread Previous | Thread Next
Rob Kinyon
June 3, 2005 05:32
Re: date and time formatting
Message ID:
> localtime() and gmtime() seem fairly core to me.  The array contexts are
> simple, and the scalar context is an RFC valid string.  Nothing too heavy
> there.  The time() function is "typically" only moderately useful without
> localtime().

This is true if the time() function returns a simple scalar containing
seconds since the Unix epoch. If, however, it returned a DateTime
object that numified to said value, but provided both localtime() and
gmtime() methods (and a whole lot more) ... wouldn't that be better?


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About