http://qs321.pair.com?node_id=1231988


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

Case of using default of 0 hours & 0 minutes as the time of the recurring event: If the time has already passed (Mar 18 0:0a) before the start of recurring event period (Mar 18 10:12a to Mar 24 3:15p), then including Mar 18 as one of the dates of the recurring event will be erroneous.

  • Comment on Re^4: DateTime::Format::Strptime Parsing Seems to have a Problem?

Replies are listed 'Best First'.
Re^5: DateTime::Format::Strptime Parsing Seems to have a Problem?
by ozboomer (Friar) on Apr 03, 2019 at 10:58 UTC

    Curious... but an interesting point.

    Again, the docs state:

    If no parameters are given, then the set members each occur at the beginning of the specified recurrence.

    I would read that to mean that as I'm specifying a 'daily' recurrence, the 'beginning' of the recurrence is 00 hours of the specified day when a set is created (the item's beginning is the next smaller measure - a daily recurrence starts from a zero hour). The curious thing is that the docs say:

    For example, by default, the monthly() method returns a set containing the first day of each month.

    ...which should, if the definition was consistent, refer to the first week of the month... but it refers to the first day.

    I admit I'm sometime as thick as a brick... but if the docs aren't clear (and/or can be misinterpreted), they aren't clear... tha's all.

      For example, by default, the monthly() method returns a set containing the first day of each month.
      ...which should, if the definition was consistent, refer to the first week of the month... but it refers to the first day.

      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.

        (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.