obsidian-calendar-plugin icon indicating copy to clipboard operation
obsidian-calendar-plugin copied to clipboard

Days shifted after changing "Start week on:" (fixed after reload/restart)

Open fkuersch opened this issue 2 years ago • 0 comments

Before Submitting: Double-check that you are running the latest version of the plugin. The bug might have already been fixed 😄

Describe the bug

When changing the "Start week on" option, the days of the week will be shifted by one. Restarting or reloading Obsidian fixes the issue.

Steps to reproduce

  1. In the calendar, navigate to January 2022. Note that January 1 is a Saturday.
  2. Go to Settings -> Calendar
  3. Change the 'Start week on' option ie. from Monday to Sunday
  4. Error: The days of the week are shifted by one. January 1 now appears to start on Friday.
  5. Reloading (or restarting) obsidian fixes that. The year starts on Saturday again.

Note that I'm using 'de' as my locale.

Expected behavior

The calendar should change immediately without restarting or reloading obsidian.

Screenshots

Apple Calendar as a reference: January 1 is a Saturday Screen Shot 2022-06-08 at 08 18 45

Initial situation (locale: de, start week on locale default (mondays)): Screen Shot 2022-06-08 at 08 53 12 January 1 is a Saturday (correct) Screen Shot 2022-06-08 at 08 52 52

Changing 'Start week on' to Sunday ('Sonntag'): Screen Shot 2022-06-08 at 08 53 34 January 1 appears to be a Friday (wrong) Screen Shot 2022-06-08 at 08 53 45

Environment

OS

macOS

Obsidian Version

v0.14.6

fkuersch avatar Jun 08 '22 07:06 fkuersch