Skip to content

Add admin-configurable date display format (dd/mm/yyyy support) - #1529

Open
sgreadly wants to merge 1 commit into
crocodilestick:mainfrom
sgreadly:feature/custom-date-format
Open

Add admin-configurable date display format (dd/mm/yyyy support)#1529
sgreadly wants to merge 1 commit into
crocodilestick:mainfrom
sgreadly:feature/custom-date-format

Conversation

@sgreadly

@sgreadly sgreadly commented Sep 8, 2026

Copy link
Copy Markdown

Fixes the long-standing lack of dd/mm/yyyy (and other) date format support. Previously only a single generic "English" locale was available, hardcoding US-style mm/dd/yyyy-oriented display via Babel on the book detail page, and via the browser's toLocaleDateString() on the Edit Metadata page's date picker overlay.

Changes:

  • Adds a Date Format field under Settings → Edit UI Configuration → Language & Display, accepting a strftime-style pattern (e.g. %d/%m/%Y, %d %b, %Y)
  • Book detail page (Date Added, Published, etc.) uses this pattern directly when set
  • Edit Metadata page's date picker overlay independently derives day-first vs. month-first order from the same setting (recognizing %d against %m/%b/%B), so both pages agree on ordering while keeping their own distinct visual styles (e.g. numeric 27/01/2026 in the editor vs. descriptive 27 Jan, 2026 on the detail page)
  • Leaving the field blank preserves exactly the current behaviour on both pages, fully backward compatible, no migration needed, new DB column defaults to an empty string

Known edge case: if an admin sets a format containing a month token but no %d at all (unusual, unlikely in practice), the Edit Metadata page's order-detection returns unset and falls back to the original browser-locale behaviour rather than guessing.

Changelog:

  • New config_date_format setting under Language & Display
  • Applies to book detail page (Date Added, Published, etc.) via formatdate filter
  • Edit Metadata date picker overlay independently derives day/month order from the same setting, recognising %d against %m/%b/%B
  • Blank setting preserves existing behaviour exactly (backward compatible)

Closes #1525

- New config_date_format setting under Language & Display
- Applies to book detail page (Date Added, Published, etc.) via formatdate filter
- Edit Metadata date picker overlay independently derives day/month order
  from the same setting, recognizing %d against %m/%b/%B
- Blank setting preserves existing behavior exactly (backward compatible)
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.

[Feature Request] English locale for UK/NZ/AU, for dd/mm/yyyy instead of mm/dd/yyyy

1 participant