News for hackers. Stuff that matters.
Re:ISO week date by fanf2 on Thursday December 26, 2019 @08:25AM (#21883604)
Here is how to format an ISO week date with strftime:

“%G-W%V-%u”

This is in POSIX

https://pubs.opengroup.org/onlinepubs/9699919799.2018edition...

and C99

http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf

Python’s documentation explicitly says it only describes the C89 formatting codes and that C99 has more features. https://docs.python.org/2.7/library/datetime.html#strftime-s...

Re:ISO week date by bshipp on Thursday December 26, 2019 @10:07AM (#21884273)
While it's fine and good that ISO has defined week numbers, it has been less than helpful when working with North American firms whose weeks start on Sunday and who expect January 1st to be week 1. I've ended up having to write custom code to handle this in my programs as most generic libraries support ISO and not much else.