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

Re: date and time formatting

Thread Previous | Thread Next
From:
Rob Kinyon
Date:
June 3, 2005 05:32
Subject:
Re: date and time formatting
Message ID:
703844205060305325c28b7a9@mail.gmail.com
> 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?

Rob

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About