4 ms·
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/functions/str
by fanf2 7y ago
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/functions/strftime.html https://pubs.opengroup.org/onlinepubs/9699919799.2018edition...
and C99
http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf 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-strptime-behavior https://docs.python.org/2.7/library/datetime.html#strftime-s...
- bshipp 7y agoWhile 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.