feat(advanced-search): align date display to oCIS locale#351
feat(advanced-search): align date display to oCIS locale#351paul43210 wants to merge 2 commits intoowncloud:mainfrom
Conversation
Use the user's oCIS preferred language setting (from userStore) for date formatting instead of hardcoded ISO format. Dates now display in the user's locale (e.g., "16 Mar 2026" for en, "16. Mär. 2026" for de). Added formatDateTime() helper with 24-hour time format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove hardcoded hour12: false — the locale already determines the appropriate time format (e.g., en-US uses 12h, de uses 24h). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
536f50f to
70eec79
Compare
|
Thanks for testing Martin! The date input fields use The locale changes in this PR affect the formatted date text elsewhere in the UI (saved query timestamps, result dates, etc.), not the native date picker inputs. Could you point me to an existing example in oCIS/web where a date picker respects the oCIS language setting? I'd be happy to build a custom date input component that formats according to the user's oCIS language preference, but I want to make sure we're aligning with how other parts of the UI handle this — and honestly, the oCIS "Language" setting is a language preference, not a full locale (which would include regional date/number formatting). So it's not clear what the expected date format for "DE" should be — Germany uses Let me know how you'd like to proceed — happy to build something if there's a clear spec to follow. |
|
To add to the above — a language setting alone isn't enough to determine date format. For example, "English" in the US uses If we want custom date pickers that respect a specific format, oCIS preferences would need a true Locale setting (e.g., |


Summary
formatDate()updated to accept optional locale parameter, usestoLocaleDateString()with the oCIS user localeformatDateTime()helper with 24-hour time format for future useuserStore.user.preferredLanguage(oCIS account setting), falling back to browser defaultExamples:
Test plan
🤖 Generated with Claude Code