Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Adding to dates

by explorer (Chaplain)
on Aug 23, 2006 at 02:08 UTC ( #569004=note: print w/ replies, xml ) Need Help??


in reply to Adding to dates

Solved with Date::Manip, for example:

#!/usr/bin/perl -l use Date::Manip; my $date = ParseDate("01/31/07"); my @dates = ParseRecur("0:1:0*-1:0:0:0",$date,$date,"01/31/08"); foreach ( @dates ) { print UnixDate $_,"%D"; }
Output:
01/31/07
02/28/07
03/31/07
04/30/07
05/31/07
06/30/07
07/31/07
08/31/07
09/30/07
10/31/07
11/30/07
12/31/07


Comment on Re: Adding to dates
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://569004]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-04-23 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (541 votes), past polls