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

Re: [MacPerl] date functions



At 19.21 9/25/97, David Beck wrote:
>I have several Perl scripts written for a unix platform that makes calls to
>'date' using various +format options. Does anyone have a module or code
>fragment suitable for use in MacPerl that could handle this call with
>suitable changes to the original code (rather than a complete rewrite using
>time(), etc.)?

Use the Date::Format module from CPAN.  I don't know how much you'll have
to change your code, but it isn't that much code to change.

use Date::Format;
$format = "%m-%d-%y";
print time2str($format,time);

--
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