Skip to content

Build format presets from the regional format - #168

Merged
danielchalmers merged 6 commits into
masterfrom
claude/regional-format-presets
Oct 5, 2026
Merged

danielchalmers merged 6 commits into
masterfrom
claude/regional-format-presets

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

The clock presets and the default format were US patterns like {h:mm tt} and {MMM dd}. In most regions that meant "Time" showed a 12-hour time with no AM/PM (1:01 for 1:01 PM) and dates used US order. They now come from the Windows regional format:

  • Times are 24-hour where the region uses them, and "Time (24-hour)" only shows where it adds something
  • Weekday order and punctuation follow the region: Di, 22. Sep, 13:01 in Germany, mar. 22 sept. 13:01 in France, 22 Eyl Sal 13:01 in Turkey, 9月22日(火) 13:01 in Japan, 9월 22일 (화) 오후 1:01 in Korea
  • Month names that don't work after a day number use the full name (Ukrainian 22 вересня) or numbers (Vietnamese 22/09)
  • Chinese, Japanese, and Korean building blocks include the unit (22日, 9月, 2026年)
  • The Digital countdown preset uses colons (03:04:30:10), since the dot read as a date
  • The default format for new installs follows the region. Existing settings files keep their saved format
  • US presets are unchanged except month-day uses d instead of dd, so "Sep 05" reads "Sep 5"
  • Removes DateFormatExample and three view-model commands that have had no callers since the inline editors replaced them
desktopclock-168-presets desktopclock-168-countdown-targets

A test renders every preset in every Windows region to make sure none come out as "Bad format".

@github-actions github-actions Bot added the enhancement New feature or request label Sep 22, 2026
@danielchalmers
danielchalmers added this pull request to stack #170 September 22, 2026 20:00
@danielchalmers
danielchalmers force-pushed the claude/regional-format-presets branch from f0c8d38 to 8e319c3 Compare October 5, 2026 15:54
Base automatically changed from claude/ai-translated-localization-1b9e00 to master October 5, 2026 17:09
The clock presets and the default format were US patterns like {h:mm tt} and {MMM dd}, so in most regions "Time" showed a 12-hour time with no AM/PM (1:01 for 1:01 PM) and dates used US month-day order. They now come from the Windows regional format: 14:56 and "Di, 22. Sep" in Germany, 오후 2:56 in Korea, 9月22日 in China.

- US presets are unchanged except month-day uses d instead of dd, so "Sep 05" reads "Sep 5"
- "Time, 24-hour" only shows where the regional time is 12-hour, since elsewhere it repeats "Time"
- The default format for new installs follows the region; existing settings files keep their saved format
- The countdown target examples and the "Time" building block follow the region too
The presets and default format always put a comma-separated weekday first, which is how Western languages write dates but reads as foreign in East Asia (火, 9月22日, 13:01:22). Chinese, Japanese, and Korean now get the date first with the weekday after it, the way Windows and native apps write it: 9月22日(火) 13:01:22 in Japanese, 9月22日 周二 13:01:22 in Chinese, and 9월 22일 (화) 오후 1:01:22 in Korean. The countdown target examples follow the same order. Other languages are unchanged.
"Time" now inserts the regional time format, so in 24-hour regions like Germany it inserted the same {HH:mm} as "Time (24-hour)". The 24-hour building block now only shows where the regional time is 12-hour, the same rule the presets use, and the building blocks live next to the presets in FormatPresets.
DateFormatExample and the view model's SetFormat, ResetCountdown, and ResetCountdownFormat commands have had no callers since the inline format and countdown editors replaced the old dropdowns. DateFormatExample also hardcoded US patterns and read the always-null DefaultThreadCurrentCulture, which the clock itself passed as its format provider too; the clock now passes CultureInfo.CurrentCulture like the editor preview does (no change in behavior).
A review of the running app in each language found the presets still wrote dates the English way outside Chinese, Japanese, and Korean. The weekday order and punctuation now come from the region's own long date format:

- French, Italian, and Dutch drop the English commas: mar. 22 sept. 13:01:22
- Turkish puts the weekday after the date: 22 Eyl Sal 13:01:22
- Regions whose long date leaves out the weekday (Canadian French, European Portuguese, British English) follow their language
- Where .NET's short month names can't be used after a day number, the date uses the full month (Ukrainian 22 вересня instead of 22 Вер) or numbers (Vietnamese 22/09 instead of 22 Thg9)
- The countdown target examples use the same punctuation as the presets, so English gets its comma before the time

English, German, Spanish, Brazilian Portuguese, Indonesian, and Polish are unchanged.
- Chinese, Japanese, and Korean building blocks include the unit: in Japanese, Month and Day inserted bare numbers (10, 05) instead of 10月 and 5日; Japanese and Korean also drop Month (full), which was the same as Month
- The Digital countdown preset separated days from hours with a dot (03.04:30:10), which reads as a date in most regions and as a time in Indonesia; it now uses colons (03:04:30:10)
@danielchalmers
danielchalmers force-pushed the claude/regional-format-presets branch from 8e319c3 to 22e9fb1 Compare October 5, 2026 17:09
@danielchalmers
danielchalmers merged commit da5a947 into master Oct 5, 2026
4 checks passed
@danielchalmers
danielchalmers deleted the claude/regional-format-presets branch October 5, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant