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


in reply to Re^6: DateTime::Format::Strptime Parsing Seems to have a Problem?
in thread DateTime::Format::Strptime Parsing Seems to have a Problem?

(These replies are getting too deep(!))

A monthly event happens once a month. (Why should such an event last whole week?) It could be that I do not have the same cultural background as you do related to calendar and time.

I'm not saying anything about how long an event lasts (or anything cultural/how time is divided); it's about how the recurrence interval 'zero point' is defined... and its inconsistency. Have another look at the examples I quote: (we're guessing) one uses the relevant 'zero point' for the next smallest 'time division' (use the '0th hour' as the starting point for a 'day' recurrence), while the other example does NOT use that convention (you'd expect the '0th week' (or '0th fortnight') as the starting point for a 'monthly' recurrence)... but that's not how it works -- the rules are inconsistent.

Hence, I'd suggest it would be helpful to include a table in the docs that defines the 'zero point' of the 'beginning' of each 'recurrence type'... so that users of a 'recurrence type' would be more likely to understand the actual workings of the recurrence.. instead of needing to spend time trying to deduce how the recurrence is working.

Replies are listed 'Best First'.
Re^8: DateTime::Format::Strptime Parsing Seems to have a Problem?
by soonix (Canon) on Apr 05, 2019 at 07:06 UTC
    you'd expect the '0th week' (or '0th fortnight') as the starting point for a 'monthly' recurrence
    • Not all months start at the start of a week (or of a fortnight, for that matter), and most 11¼ out of 12 months don't have an integral number of these.
    • Every month (and week) starts at the beginning of a day, and contains an integral number of days.