http://www.perlmonks.org?node_id=569004


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