Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by parv (Vicar)
on Apr 03, 2019 at 13:59 UTC ( #1232096=note: print w/replies, xml ) Need Help??


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

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.

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

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

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

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1232096]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2020-10-20 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (210 votes). Check out past polls.

    Notices?