Universal "First day of Week" option that plugins can access

Use case or problem

momentjs and Luxon are both utilized by many plugins to consistently format dates through Obsidian. By default, both seem to default to whatever the user’s locale says is the start day of the week. In the United States, this is Sunday.
Many plugins, such as Day Planner, have an option for you to override this to set your first day of the week to Monday. However, this can cause inconsistent behavior when using dataview and templater with these plugins.
An example of why this is an issue: My weekly note has a templater script that specifies which day is the first and last day of the week. Being that it is Sunday, if your locale is set to the United States, we are still in calendar week 4. Meanwhile, Day Planner is showing my preference, which is that the week starts on Monday, causing confusion and inconsistency when I inevitably forget how this all works.

Proposed solution

I am not a plugin developer. However, I think that users and plugin developers would benefit from a setting where the desired first day could be specified. This way, plugin authors can rely on an Obsidian setting instead of relying on the user’s locale or a drop down in their own plugin’s settings.

Current workaround (optional)

For some reason, using the Calendar community plugin is a known workaround for this issue. Setting the beginning of the week to Monday in this plugin causes the rest of my plugins to follow suit. However, I do not use the Calendar plugin for anything other than setting the first day of the week. The calendar plugin has not been updated in 4 years, leading me to wonder if this workaround will eventually break. I also periodically go “huh, I don’t use this, why is it installed?” and uninstall it, causing a lot of my templater scripts and dataview queries to break.
Unfortunately, setting the first day of the week to Monday in Windows doesn’t do anything.

Related feature requests (optional)

1 Like