Surn commited on
Commit
583f150
Β·
1 Parent(s): a6975b2

Time and Date Documentation Update

Browse files
CLAUDE.md CHANGED
@@ -49,6 +49,13 @@ Wrdler is a simplified vocabulary puzzle game based on BattleWords:
49
  - **Storage:** Folder-based discovery at `games/leaderboards/{daily|weekly}/{period}/{file_id}/settings.json`
50
  - **File ID Format:** `{wordlist_source}-{game_mode}-{sequence}` (e.g., `classic-classic-0`)
51
  - **Leaderboard Page:** Four tabs (Today, Daily, Weekly, History) accessible via `?page=today|daily|weekly|history`
 
 
 
 
 
 
 
52
 
53
  ### AI Word Generation
54
  - Topic-based word list generation via HuggingFace Spaces or local transformers
 
49
  - **Storage:** Folder-based discovery at `games/leaderboards/{daily|weekly}/{period}/{file_id}/settings.json`
50
  - **File ID Format:** `{wordlist_source}-{game_mode}-{sequence}` (e.g., `classic-classic-0`)
51
  - **Leaderboard Page:** Four tabs (Today, Daily, Weekly, History) accessible via `?page=today|daily|weekly|history`
52
+ - Leaderboard files use UTC for all period boundaries.
53
+ - When displaying daily leaderboards, show the UTC period as a PST date range.
54
+ - Example: For UTC file date 2025-12-08, display:
55
+ 2025-12-08 00:00:00 UTC to 2025-12-08 23:59:59 UTC
56
+ and
57
+ 2025-12-07 16:00:00 PST to 2025-12-08 15:59:59 PST
58
+ The leaderboard expander label should show: `Monday, December 08, 2025 4:00 PM PST – Tuesday, December 09, 2025 3:59:59 PM PST [settings badge]`
59
 
60
  ### AI Word Generation
61
  - Topic-based word list generation via HuggingFace Spaces or local transformers
README.md CHANGED
@@ -94,6 +94,13 @@ Wrdler is a vocabulary learning game with a simplified grid and strategic letter
94
  - **Storage:** Folder-based discovery in HuggingFace repo (no index.json)
95
  - Path: `games/leaderboards/{daily|weekly}/{period}/{file_id}/settings.json`
96
  - File ID format: `{wordlist_source}-{game_mode}-{sequence}` (e.g., `classic-classic-0`)
 
 
 
 
 
 
 
97
 
98
  **Leaderboard Page Features:**
99
  - **Today Tab:** Current daily and weekly leaderboards side-by-side
 
94
  - **Storage:** Folder-based discovery in HuggingFace repo (no index.json)
95
  - Path: `games/leaderboards/{daily|weekly}/{period}/{file_id}/settings.json`
96
  - File ID format: `{wordlist_source}-{game_mode}-{sequence}` (e.g., `classic-classic-0`)
97
+ - **Time Display:**
98
+ - Leaderboard files store UTC dates/times for each period.
99
+ - When viewing daily leaderboards, the app displays the UTC period as a PST date range:
100
+ - For example, a UTC file date of `2025-12-08` covers `2025-12-08 00:00:00 UTC` to `2025-12-08 23:59:59 UTC`, which is displayed as `2025-12-07 16:00:00 PST` to `2025-12-08 15:59:59 PST`.
101
+ - The leaderboard expander label should show: `Monday, December 08, 2025 4:00 PM PST – Tuesday, December 09, 2025 3:59:59 PM PST [settings badge]`
102
+ - Daily leaderboards display the date range in PST for easier local time understanding.
103
+ - Weekly leaderboards use ISO week dates (e.g., `2025-W49`) and are available every Monday.
104
 
105
  **Leaderboard Page Features:**
106
  - **Today Tab:** Current daily and weekly leaderboards side-by-side
specs/leaderboard_spec.md CHANGED
@@ -873,4 +873,14 @@ HF_REPO_ID/games/
873
  - Partial failures:
874
  - If daily succeeds and weekly fails (or vice versa), return both statuses independently; UI reports partial success.
875
 
876
- ---
 
 
 
 
 
 
 
 
 
 
 
873
  - Partial failures:
874
  - If daily succeeds and weekly fails (or vice versa), return both statuses independently; UI reports partial success.
875
 
876
+ ### 14.10 Timezone Handling
877
+
878
+ - Daily leaderboard files use UTC for period boundaries.
879
+ - When displaying, show the UTC period as a PST date range:
880
+ For daily leaderboards, display the period as:
881
+ "YYYY-MM-DD 00:00:00 UTC to YYYY-MM-DD 23:59:59 UTC"
882
+ and
883
+ "YYYY-MM-DD HH:MM:SS PST to YYYY-MM-DD HH:MM:SS PST"
884
+ (PST is UTC-8; adjust for daylight saving as needed)
885
+ For example, a UTC file date of `2025-12-08` covers `2025-12-08 00:00:00 UTC` to `2025-12-08 23:59:59 UTC`, which is displayed as `2025-12-07 16:00:00 PST` to `2025-12-08 15:59:59 PST`.
886
+ The leaderboard expander label should show: `Monday, December 08, 2025 4:00 PM PST – Tuesday, December 09, 2025 3:59:59 PM PST [settings badge]`
specs/requirements.md CHANGED
@@ -191,6 +191,13 @@ This document breaks down the implementation tasks for Wrdler using the game rul
191
  **Test Results:** βœ… 25/25 tests passing (100%)
192
 
193
  ## Leaderboard System (v0.2.1) βœ… IMPLEMENTED
 
 
 
 
 
 
 
194
 
195
  ### Core Implementation
196
 
 
191
  **Test Results:** βœ… 25/25 tests passing (100%)
192
 
193
  ## Leaderboard System (v0.2.1) βœ… IMPLEMENTED
194
+ - Leaderboard files store UTC dates/times for each period.
195
+ - When displaying daily leaderboards, show the UTC period as a PST date range.
196
+ - Example: For UTC file date 2025-12-08, display:
197
+ 2025-12-08 00:00:00 UTC to 2025-12-08 23:59:59 UTC
198
+ and
199
+ 2025-12-07 16:00:00 PST to 2025-12-08 15:59:59 PST
200
+ The leaderboard expander label should show: `Monday, December 08, 2025 4:00 PM PST – Tuesday, December 09, 2025 3:59:59 PM PST [settings badge]`
201
 
202
  ### Core Implementation
203
 
specs/specs.md CHANGED
@@ -86,7 +86,7 @@ Wrdler is a Python/Streamlit vocabulary puzzle game based on BattleWords, but wi
86
  - βœ… **Top 5 Display:** Leaderboard banner shows top 5 players
87
  - βœ… **Optional Sharing:** "Show Challenge Share Links" toggle (default OFF) controls URL visibility
88
 
89
- ### Leaderboard System (v0.2.1) βœ…
90
  Wrdler features a comprehensive daily and weekly leaderboard system:
91
 
92
  **Core Features:**
 
86
  - βœ… **Top 5 Display:** Leaderboard banner shows top 5 players
87
  - βœ… **Optional Sharing:** "Show Challenge Share Links" toggle (default OFF) controls URL visibility
88
 
89
+ ### Leaderboard System (v0.2.1) βœ… IMPLEMENTED
90
  Wrdler features a comprehensive daily and weekly leaderboard system:
91
 
92
  **Core Features:**