medalto has asked for the wisdom of the Perl Monks concerning the following question:
my $start="$y-$m-01";my $first="$y-$m-01"; my $datestr = UnixDate(ParseDate($start), " %b");my $last_day=ParseDat +e("last day in $datestr"); print "$first,$start,$end\n"; my @t_dates = &ParseRecur("0:0:0:1:0:0:0",$first,$start,$end); print "@t_dates"; print "\n------\n";
2011-01-01,2011-01-01,2011-01-31 2011010100:00:00 2011010200:00:00 2011010300:00:00 2011010400:00:00 20 +11010500:00:00 2011010600:00:00 2011010700:00:00 2011010800:00:00 201 +1010900:00:00 2011011000:00:00 2011011100:00:00 2011011200:00:00 2011 +011300:00:00 2011011400:00:00 2011011500:00:00 2011011600:00:00 20110 +11700:00:00 2011011800:00:00 2011011900:00:00 2011012000:00:00 201101 +2100:00:00 2011012200:00:00 2011012300:00:00 2011012400:00:00 2011012 +500:00:00 2011012600:00:00 2011012700:00:00 2011012800:00:00 20110129 +00:00:00 2011013000:00:00 2011013100:00:00 ------ 2011-02-01,2011-02-01,2011-02-28 2011020100:00:00 2011020200:00:00 2011020300:00:00 2011020400:00:00 20 +11020500:00:00 2011020600:00:00 2011020700:00:00 2011020800:00:00 201 +1020900:00:00 2011021000:00:00 2011021100:00:00 2011021200:00:00 2011 +021300:00:00 2011021400:00:00 2011021500:00:00 2011021600:00:00 20110 +21700:00:00 2011021800:00:00 2011021900:00:00 2011022000:00:00 201102 +2100:00:00 2011022200:00:00 2011022300:00:00 2011022400:00:00 2011022 +500:00:00 2011022600:00:00 2011022700:00:00 2011022800:00:00 ------ 2011-03-01,2011-03-01,2011-03-31 2011030100:00:00 2011030200:00:00 2011030300:00:00 2011030400:00:00 20 +11030500:00:00 2011030600:00:00 2011030700:00:00 2011030800:00:00 201 +1030900:00:00 2011031000:00:00 2011031100:00:00 2011031200:00:00 2011 +031300:00:00 2011031400:00:00 2011031500:00:00 2011031600:00:00 20110 +31700:00:00 2011031800:00:00 2011031900:00:00 2011032000:00:00 201103 +2100:00:00 2011032200:00:00 2011032300:00:00 2011032400:00:00 2011032 +500:00:00 2011032600:00:00 2011032700:00:00 2011032801:00:00 20110329 +01:00:00 2011033001:00:00 ------ 2011-04-01,2011-04-01,2011-04-30 2011040100:00:00 2011040200:00:00 2011040300:00:00 2011040400:00:00 20 +11040500:00:00 2011040600:00:00 2011040700:00:00 2011040800:00:00 201 +1040900:00:00 2011041000:00:00 2011041100:00:00 2011041200:00:00 2011 +041300:00:00 2011041400:00:00 2011041500:00:00 2011041600:00:00 20110 +41700:00:00 2011041800:00:00 2011041900:00:00 2011042000:00:00 201104 +2100:00:00 2011042200:00:00 2011042300:00:00 2011042400:00:00 2011042 +500:00:00 2011042600:00:00 2011042700:00:00 2011042800:00:00 20110429 +00:00:00 2011043000:00:00 ------ 2011-05-01,2011-05-01,2011-05-31 2011050100:00:00 2011050200:00:00 2011050300:00:00 2011050400:00:00 20 +11050500:00:00 2011050600:00:00 2011050700:00:00 2011050800:00:00 201 +1050900:00:00 2011051000:00:00 2011051100:00:00 2011051200:00:00 2011 +051300:00:00 2011051400:00:00 2011051500:00:00 2011051600:00:00 20110 +51700:00:00 2011051800:00:00 2011051900:00:00 2011052000:00:00 201105 +2100:00:00 2011052200:00:00 2011052300:00:00 2011052400:00:00 2011052 +500:00:00 2011052600:00:00 2011052700:00:00 2011052800:00:00 20110529 +00:00:00 2011053000:00:00 2011053100:00:00 ------ 2011-06-01,2011-06-01,2011-06-30 2011060100:00:00 2011060200:00:00 2011060300:00:00 2011060400:00:00 20 +11060500:00:00 2011060600:00:00 2011060700:00:00 2011060800:00:00 201 +1060900:00:00 2011061000:00:00 2011061100:00:00 2011061200:00:00 2011 +061300:00:00 2011061400:00:00 2011061500:00:00 2011061600:00:00 20110 +61700:00:00 2011061800:00:00 2011061900:00:00 2011062000:00:00 201106 +2100:00:00 2011062200:00:00 2011062300:00:00 2011062400:00:00 2011062 +500:00:00 2011062600:00:00 2011062700:00:00 2011062800:00:00 20110629 +00:00:00 2011063000:00:00 ------
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date::Manip problem when creating arrays
by Corion (Patriarch) on Aug 01, 2011 at 21:11 UTC | |
|
Re: Date::Manip problem when creating arrays
by ww (Archbishop) on Aug 01, 2011 at 21:18 UTC | |
by medalto (Novice) on Aug 02, 2011 at 06:23 UTC | |
by Corion (Patriarch) on Aug 02, 2011 at 06:43 UTC | |
by SBECK (Chaplain) on Aug 02, 2011 at 15:58 UTC |