i want to create a series of arrays of dates for the first 6 months of the year The output for march isnt correct . Anyone know why, and how to fix it ?
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 ------

In reply to Date::Manip problem when creating arrays by medalto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.