[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] newbie alert :-) question on the date thing...



At 01.46 8/15/97, Paul Evad wrote:
>Anyway, php has a function where you can format a date string by passing a
>format string to it, like date("Y, m d H:i:s",$date) (where $date is a unix
>time stamp).
>
>I looked around but couldn't find a similar thing for perl (to my limited
>knowledge). Time::Local didn't seem to be what I wanted (am I wrong
>there?).

There is a module called Date::Format on CPAN (http://www.perl.org/CPAN/)
which does this.

#!perl -w
use Date::Format;
@date1 = localtime();
$date2 = strftime('%A, %B %e, %Y',@date1);
print $date2,"\n";

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch