Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: date picker in Reading mode & searches honours first day of week #3259

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

esm7
Copy link
Contributor

@esm7 esm7 commented Jan 2, 2025

Types of changes

Changes visible to users:

Description

The new date picker is an awesome, super useful addition. But the way it was introduced, it was hard-coded for the week to start on Monday, which is not the case for many users. This fix tries to query the system's locale for the correct day of the week, and uses Monday only if no such information is available.

Motivation and Context

As described above.

Fixes #3239.

How has this been tested?

Tested on the latest Obsidian Desktop and Android app.

Screenshots (if appropriate)

Checklist

Terms

Copy link

sonarqubecloud bot commented Jan 2, 2025

@esm7 esm7 changed the title Use the system's locale for the date picker first day of the week Fix - use the system's locale for the date picker first day of the week Jan 2, 2025
@claremacrae claremacrae changed the title Fix - use the system's locale for the date picker first day of the week fix: use the system's locale for the date picker first day of the week Jan 2, 2025
@claremacrae claremacrae changed the title fix: use the system's locale for the date picker first day of the week fix: date picker in Reading mode and search results honours first day of the week Jan 2, 2025
@claremacrae claremacrae changed the title fix: date picker in Reading mode and search results honours first day of the week fix: date picker in Reading mode & searches honours first day of week Jan 2, 2025
@claremacrae
Copy link
Collaborator

Thank you - I've edited the description to say that it fixes #3239.

@claremacrae
Copy link
Collaborator

Tested on macOS 15.1.1 (24B2091)

  • General > Date & Time
    • Turned off "Set time zone automatically...."
    • Set "Closest city" to "Seattle, WA - United States"
  • General > Language & Region
    • Changed Region to "United States"
    • Said "Yes" to changing language to "English (US)"
  • Rebooted Mac

The date-picker in Reading view and Tasks search results then switched to starting the week on Sunday!

@claremacrae claremacrae added the scope: user interface Changes to parts of UI other the Edit task modal. See also "scope: edit task" label Jan 3, 2025
@claremacrae claremacrae merged commit 5ef3145 into obsidian-tasks-group:main Jan 3, 2025
3 checks passed
@claremacrae
Copy link
Collaborator

Many thanks for doing this @esm7! 🎉 ❤️

@esm7
Copy link
Contributor Author

esm7 commented Jan 3, 2025

Many thanks for the date picker, it's the most important feature I had no clue I needed so much! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: user interface Changes to parts of UI other the Edit task modal. See also "scope: edit task"
Projects
None yet
2 participants