How to get week start dates and week number of each week in a year
considering start day of the week is Monday in python?
How can I get week start dates of each week in a year, considering start
day of the week is Monday in python?
This assumes start day is Sunday:
>>>import datetime as datetime
>>>dt = datetime .date(2013,12,30)
>>>dt.isocalendar()[1]
1
However, result shouldn't be 1, because 30-12-2013 is still in 2013.
No comments:
Post a Comment