2018-07-08から1日間の記事一覧

Python でのカレンダー週番号

Python で年の週、を取得するのは、datetime の isocalendar 3 要素のタプル (ISO 年、ISO 週番号、ISO 曜日) が返ってきます。 import datetimetoday = datetime.datetime.today() weekNumber = today.isocalendar()[1] print(weekNumber)しかし、月曜始ま…