Spaces:
No application file
No application file
Download src/common/time.py from metasoccer/collab: direct link, hf CLI and curl.
- Browser
- Download file 470 Bytes
-
https://huggingface.co/spaces/metasoccer/collab/resolve/main/src/common/time.py
- Command line
-
hf download hf://spaces/metasoccer/collab/src/common/time.py
-
curl -L -o time.py https://huggingface.co/spaces/metasoccer/collab/resolve/main/src/common/time.py
470 Bytes
| import datetime | |
| big_bang = datetime.datetime(2023, 10, 1) | |
| current_day = datetime.datetime.now().date() | |
| current_quarter_start = datetime.datetime(datetime.datetime.now().year, ((datetime.datetime.now().month - 1) // 3) * 3 + 1, 1) | |
| current_week_start = datetime.datetime.combine(datetime.datetime.now().date() - datetime.timedelta(days=datetime.datetime.now().weekday()), datetime.time()) | |
| current_week_start_plus_one_week = current_week_start + datetime.timedelta(days=7) |