Get week number using date in python
问题 Date is datetime.date(2013, 12, 30) I am trying to get week number using import datetime datetime.date(2013, 12, 30).isocalendar()[1] I am getting output as , 1 Why i am not getting week number of last year , instead i am getting week number of current year? Whats wrong i am doing here ? 回答1: You are doing nothing wrong, 2013/12/30 falls in week 1 of 2014, according to the ISO8601 week numbering standard: The ISO 8601 definition for week 01 is the week with the year's first Thursday in it.