Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^5: I want to know the current week number of the current monthby pryrt (Abbot) |
on Oct 12, 2017 at 14:09 UTC ( [id://1201228]=note: print w/replies, xml ) | Need Help?? |
Which week did 1. of October (Sunday) and 2. belong to? That's a notation I've seen that avoids mucking about with "st", "nd", "th" for the ordinals. "1. of October" means "1st of October" or "first of October". IIRC, it's more common in Europe than the States, but I don't know if it's all of Europe, or just certain areas. I don't know if you're European or not, or whether my regional assumptions about the notation are correct; however, I am guessing you didn't recognize the "." notation for ordinals, and that's what's confusing you. If I've mis-guessed, you'll have to explain exactly what you don't understand. The questions were all meant to elicit more thought and more definition of the problem on your part. Do you define "October Week 1" as October 1st through 7th, and "October Week 2" as October 8th through 14th, no matter what year it is (so whether October starts on Mon, Tue, Wed,...)? Or is "Week 1" the first week that includes a Thursday in October, and it's "Week 0" if it's Friday October 1st (some other year)? Or if October 1st is a Saturday, is Saturday the only day of "October Week 1" and Sunday is the first day of "October Week 2"? update: Or, if your weeks start on Monday, then shift those cases by a day. (I am not asking exact questions. I am asking to elicit more thought and a more detailed definition./update How do you handle potential extra partial week at the end of the month (this year, is the 29th part of "October Week 5", or is it part of "November Week 1" or something else entirely?)
In Section
Seekers of Perl Wisdom
|
|