Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How to find first day of the first week on the month?

by DrHyde (Prior)
on Sep 30, 2013 at 12:22 UTC ( #1056342=note: print w/replies, xml ) Need Help??


in reply to How to find first day of the first week on the month?

The first day of a week will be determined by culture. It's normally Monday, but I understand that some Christians use Sunday. Followers of other superstitions may use other days for all I know.

Deciding what is the first week of a month is not easy. Consider May 2013, for example, which began on a Wednesday. That's the week that began on Monday the 29th of April. Or consider June 2013, which began on a Saturday, that being in the week that began on Mon 27 May. Most people would say that the first week of May began on the 29th of April, but that the first week of June began on Mon 3 Jun.

ISO 8601 is normally the fount of all wisdom, but in this case isn't particularly helpful as it only defines the first week of a *year*, not of a month - the first week of a year begins on the Monday between Dec 29 and Jan 4, which is the same as saying that it is the one that contains fhe first Thursday of the year. You could adopt that rule for months, but should expect people to disagree with you!

  • Comment on Re: How to find first day of the first week on the month?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2019-05-20 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (123 votes). Check out past polls.

    Notices?