Pythonの`json`モジュールにおけるカスタムデシリアライゼーションは、`object_hook`や`parse_float`などのパラメータを使用することで、複雑なデータ型を柔軟に処理できます。 `datetime`やカスタムクラスなどの非標準データ型は、JSONデータに`objecttype`フィールドを ...
Learn how to work with date and time values using Python's datetime library, and how to avoid some of the gotchas and pitfalls of the datetime datatype. Python’s datetime library, part of its standard ...
その日付の曜日に対して月曜は「0」から日曜は「6」を返す。 なので 曜日取得用のリストを作成しておき、そのリストから呼び出すようにする 曜日取得用のリスト days_of_week = [ '月', '火', '水', '木', '金', '土', '日' ] day_of_week = days_of_week[ datetime.weekday( ) ] ...