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

Wrong year (of the week)

Open edgar4s opened this issue 2 years ago • 5 comments

Bug

Calendar's week shortcut opens previous year's week

Steps to reproduce

Clicking on week's number in Calendar view opens corresponding week of the previous year see picture

Expected behavior

Correct year

Screenshots

see picture

Environment

OS

Windows 11

Obsidian Version

v0.14.6

Calendar Plugin Version

1.5.10

edgar4s avatar May 20 '22 05:05 edgar4s

Changing (overriding) locale didn't help, neither reinstalling the Calendar plugin or Obsidian.

edgar4s avatar May 20 '22 05:05 edgar4s

I have the same issue. I'm running the same version. Maybe this will help. Here's my weekly template (from periodic plugin).

Weekly Notes - {{title}}
Week: <% tp.date.now("YYYY-[W]WW") %> created on <% tp.date.now("dddd, MMMM Do, YYYY") %>
<< [<% tp.date.now("YYYY-[W]WW", -7) %>](app://obsidian.md/%3C%%20tp.date.now(%22YYYY-[W]WW%22,%20-7)%20%%3E) | [<% tp.date.now("YYYY-[W]WW", 7) %>](app://obsidian.md/%3C%%20tp.date.now(%22YYYY-[W]WW%22,%207)%20%%3E) >>

Here's a weekly template I created today: image

The calendar said I was creating the weekly notes for the 20th week. Alexa said it was the 20th week :). tp.date thinks it is the 20th week. But the calendar created the 19th week.

I'm also using the latest periodic plugin.

Feels like a bug to me.

Smitty010 avatar May 21 '22 22:05 Smitty010

In fact, all of the week numbers in 2022 are shifted by one. January 1 and January 2, 2022 shall be in week 52 of 2021 (see screenshot of Apple calendar). The first week of 2022 shall start on Monday, Jan 3.

Note that I'm starting the week on mondays. But when changing that option to sundays, there's no difference for 2022 except that the second week starts on Sunday, Jan 2 (which shall be the first week).

Obsidian Calendar: Screen Shot 2022-06-08 at 08 18 10

Apple Calendar: Screen Shot 2022-06-08 at 08 18 45

fkuersch avatar Jun 08 '22 06:06 fkuersch

Related #248 Related #247 Related #222 Related #206 Related #183 Related #128

Related liamcain/obsidian-periodic-notes#95 Related liamcain/obsidian-periodic-notes#55 Related liamcain/obsidian-periodic-notes#41 Related liamcain/obsidian-periodic-notes#17 Related liamcain/obsidian-periodic-notes#13

fkuersch avatar Jun 08 '22 06:06 fkuersch

I was looking at this today and realized that I had hijacked another bug (which I am now seeing). When I click on the calendar for week 40 in my Oct 2023 calendar, the note opens for week 40, but it is year 2022. This is what the original submitter was complaining about. I misinterpreted this as my earlier problem regarding the week number (which I "fixed" by changing the locale).

Smitty010 avatar Oct 04 '23 17:10 Smitty010