Repository navigation
Build format presets from the regional format - #168
Merged
Merged
Conversation
danielchalmers
added this pull request to stack #170
September 22, 2026 20:00
danielchalmers
force-pushed
the
claude/regional-format-presets
branch
from
October 5, 2026 15:54
f0c8d38 to
8e319c3
Compare
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
force-pushed
the
claude/regional-format-presets
branch
from
October 5, 2026 17:09
8e319c3 to
22e9fb1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:01for 1:01 PM) and dates used US order. They now come from the Windows regional format:Di, 22. Sep, 13:01in Germany,mar. 22 sept. 13:01in France,22 Eyl Sal 13:01in Turkey,9月22日(火) 13:01in Japan,9월 22일 (화) 오후 1:01in Korea22 вересня) or numbers (Vietnamese22/09)22日,9月,2026年)03:04:30:10), since the dot read as a datedinstead ofdd, so "Sep 05" reads "Sep 5"DateFormatExampleand three view-model commands that have had no callers since the inline editors replaced themA test renders every preset in every Windows region to make sure none come out as "Bad format".