in reply to Date::Manip problem when creating arrays

That mass of output is truly mind-deadening...
...so I may have missed something.

But it looks to me as though the last entry for March is
2011033001:00:00 or, more readably: 2011-03-30 01:00:00.

Is the way the month is shortened by 23 hours the problem you're asking about?
Update: or 47 hours, depending on how you look at it -- carefully or carelessly. Mea culpa

If so, sad to say, I see nothing obvious * in your code to explain why that's wrong and those other months I looked at appear to be correct.

* OTOH, the mind rot incurred by reading the output (some judicious eliding, before you posted, would have helped) may be to blame for my ovesight.

Replies are listed 'Best First'.
Re^2: Date::Manip problem when creating arrays
by medalto (Novice) on Aug 02, 2011 at 06:23 UTC
    aplogies - its a balance between editing the output to highlight the problem, and enough of the output to show that there is a problem. All the output appears fine, except the last days of March
    2011032100:00:00 ..... 2011032600:00:00 2011032700:00:00 2011032801:00:00 2011032901:00:00 2011033001:00:00 it goes from 2011-03-27 00:00:00 to 2011-03-28 01:00:00 same on 29th and same on 30th and misses out completely 31st

      Have you read the documentation on Date::Manip::Recur? It explains how the recurrence pattern works. If you use it as you did, you get exact distances, and it seems that, somewhat naturally, Date::Manip declares a "day" to be "24 hours".

      It seems from the documentation that the following could work:

      0:0:0:1*0:0:0

      ... but to be sure, I recommend you actually read the documentation, now that you are aware of the fact that not all "days" are 24 hours long.

        I'll confirm that the recurrence (0:0:0:1*0:0:0) DOES work (assuming that what you are after is a list of ALL dates at time 00:00:00).

        Corion is correct about the source of the confusion... since a day is not always 24 hours long, applying a recurrence like this can give unexpected results. The only way to get around this is to make sure that the recurrence has an (*) in it which explicitly sets values in the date(s) returned.