Closed jkowalke closed 3 years ago
The '%Y' value is the year of the date, which is 2021. If you read the manual, you'll see:
Special Year/Week formats (see NOTE 2 below)
%G year, Monday as first
day of week - 0001 to 9999
%W week of year, Monday
as first day of week - 01 to 53
%G is the format you need to use to print the year that corresponds to %W. Note 2 in the documentation explains this fully, so I'd suggest you read that for a complete understanding.
If you prrint "%G%W", you will get your expected result.
Thank you very much
Hi, i believe to have found a bug regarding the year in a leap week. In my example I'm getting the current year and not the last one. In my opinion it should be the last year for the weak 53.
Code:
Result:
Expected Result:
Date::Manip-Version: 6.60 [europe/berlin]
Perl Version: This is perl 5, version 26, subversion 3 (v5.26.3) built for x86_64-linux-thread-multi (with 51 registered patches)