For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > January 2006 > Dates with Perl









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Dates with Perl
Firewalker

2004-09-28, 3:57 am

Hey guys,
I am newbie to perl. I am trying to deal with dates ( such trying to find
what the date would be after month). Is therea function or date class( I am
a java programmer, I couldnt find the right word instead of class) to do the
job?
Thanks for any help.


Peter J. Acklam

2004-09-28, 3:57 am

"Firewalker" <hana1@rogers.com> wrote:

> I am newbie to perl. I am trying to deal with dates ( such
> trying to find what the date would be after month). Is therea
> function or date class( I am a java programmer, I couldnt find
> the right word instead of class) to do the job?


There are lots of modules for this -- in fact there are too many.
As a place to start, look at Date::Manip:

perldoc Date::Manip

Peter

--
#!/local/bin/perl5 -wp -*- mode: cperl; coding: iso-8859-1; -*-
# matlab comment stripper (strips comments from Matlab m-files)
s/^((?:(?:[])}\w.]'+|[^'%])+|'[^'\n]*(?:''[^'\n]*)*')*).*/$1/x;
Dave Cross

2004-09-29, 4:58 am

On Mon, 27 Sep 2004 23:54:42 -0400, Firewalker wrote:

> Hey guys,
> I am newbie to perl. I am trying to deal with dates ( such trying to find
> what the date would be after month). Is therea function or date class( I am
> a java programmer, I couldnt find the right word instead of class) to do the
> job?


Use one or more of the the modules from the Perl DateTime project
(http://datetime.perl.org/).

Dave...
G. Harrison Chiles Jr.

2006-01-14, 7:55 am

Perl has a module you can download to handle things like that.
"Firewalker" <hana1@rogers.com> wrote in message
news:_Pednb5BxJIcfcXcRVn-gw@rogers.com...
> Hey guys,
> I am newbie to perl. I am trying to deal with dates ( such trying to find
> what the date would be after month). Is therea function or date class( I
> am a java programmer, I couldnt find the right word instead of class) to
> do the job?
> Thanks for any help.
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com