Skip to content

docs: use an explicit locale for the English month example - #13

Merged
lukeed merged 2 commits into
lukeed:masterfrom
Likio3000:docs/deterministic-date-examples-20260923
Sep 22, 2026
Merged

lukeed merged 2 commits into
lukeed:masterfrom
Likio3000:docs/deterministic-date-examples-20260923

Conversation

@Likio3000

@Likio3000 Likio3000 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

The custom dictionary example can produce a translated month such as julio while its documented output says July. Select en-US explicitly so the month matches the English example output.

Checked the dictionary callback against the implementation and existing assertions. A small built-in Date/Intl check reproduced the default-locale difference and confirmed the explicit English month under English and Spanish default locales. The tinydate suite and browser tests were not run. Prepared and reviewed with AI assistance.

Comment thread readme.md
// - Overrides {DD}
const stamp = tinydate('Today is: {MMMM} {DD}, {YYYY}', {
MMMM: d => d.toLocaleString('default', { month: 'long' }),
MMMM: d => d.toLocaleString('en-US', { month: 'long' }),

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only line that mattered

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — I've narrowed the PR to that locale change and reverted the two date-constructor edits.

@Likio3000 Likio3000 changed the title docs: make example dates and month output deterministic docs: use an explicit locale for the English month example Sep 22, 2026
@lukeed
lukeed merged commit a5780e6 into lukeed:master Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants