I am trying to get the work week number from a timestamp according to this system:
USA, Canada, most of Latin America, Japan, Israel, South Korea, among others, use a week numbering system (called North American in our Calculator) in which the first week (numbered 1) of any given year is the week which contains January 1st. The first day of a week is Sunday and Saturday is the last.
https://www.calendar-12.com/week_number
Python's strftime method supports %U
and %W
, but neither of these match that system. Pandas also adds %V
following ISO 8601 but this is not what is used in North America either.