Syntactic Confectionery Delight | |
PerlMonks |
Re: week of the yearby choroba (Cardinal) |
on Aug 07, 2014 at 13:51 UTC ( [id://1096624]=note: print w/replies, xml ) | Need Help?? |
Using Time::Piece:
The output is 24, not 32, so I'm not sure it's the solution you were after. Update: Using the %m%y%d format, you can get 33, which is almost the expected value. Maybe you are not using the ISO 8601 method to count the weeks? (At least the format of the date hints you don't.) The week number may be an unknown concept to some readers. The ISO 8601 standard defines that weeks begin on a Monday and week 1 of the year is the week that includes both January 4th and the first Thursday of the year. In other words, if the first Monday of January is the 2nd, 3rd, or 4th, the preceding days of the January are part of the last week of the preceding year. Week numbers range from 1 to 53. Using %m%d%y seems to return 32.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom
|
|