game_time
game_time
¶
Helpers for recurring Clash of Clans event windows (all times UTC).
Assumptions (these follow the game's long-standing schedule and may change):
- Clan Games: 22nd 08:00 UTC to 28th 08:00 UTC each month.
- Raid Weekend: Friday 07:00 UTC to Monday 07:00 UTC.
- Legend League day: resets daily at 05:00 UTC.
League season boundaries have changed over time, so they are deliberately not
computed here; use api.league_season() / league_season_id() instead.
clan_games_window
¶
clan_games_window(
now: datetime | None = None,
) -> tuple[datetime, datetime]
Start/end of the running Clan Games, or the next ones if none running.
Source code in cocapi/game_time.py
25 26 27 28 29 30 31 32 33 34 35 | |
raid_weekend_window
¶
raid_weekend_window(
now: datetime | None = None,
) -> tuple[datetime, datetime]
Start/end of the running raid weekend, or the next one if none running.
Source code in cocapi/game_time.py
38 39 40 41 42 43 44 45 46 47 | |
legend_day_window
¶
legend_day_window(
now: datetime | None = None,
) -> tuple[datetime, datetime]
Start/end of the current Legend League day (05:00 UTC reset).
Source code in cocapi/game_time.py
62 63 64 65 66 67 68 | |