javalent / calendarium

The ultimate Obsidian plugin for crafting mind-bending fantasy and sci-fi calendars
MIT License
84 stars 11 forks source link

Current Date Setting Displays One Month Ahead #144

Open mwsmedia opened 2 months ago

mwsmedia commented 2 months ago

Check for existing bug reports before submitting.

Expected Behavior

When selecting a "current date" in the settings, the calendar's "today" tooltip should display the correct date, and the Month setting should display the "current" month.

Current behaviour

When selecting a "current date" ibn the settings, the calendar's "today" tooltip displays the following month (eg: if the "current date" month is 3, the tooltip shows 4), and the Month setting displays the month immediately following the "current date" month.

Reproduction

  1. Launch Obsidian, etc.
  2. Open Settings > Community Plugins > Calendarium
  3. Select custom calendar > Open Custom Creator
  4. Select Dates > Current Date
  5. Enter a current date
  6. Close Calendarium settings
  7. Close Obsidian Settings
  8. Open Calendarium view in the sidebar
  9. Hover over "today" = tooltip shows Current Date setting but for the month following the month selected in step 5

NOTE: My custom calendar has two intercalary "leap" months, one at the beginning of the year and one in the middle of the year. The first appears every seven years if the year is an odd number. The second, every seven years if the year is an even number. I believe what's happening is the Current Date setting is counting all months, including intercalary months.

Which Operating Systems are you using?

Obsidian Version Check

1.7.1 and 1.4.13

Plugin Version

1.4.0

Confirmation

Possible solution

The Current Date setting should be "smart" enough to consider if the year includes a leap month or leap days and compensate as applicable.

No response

dredhorse commented 2 months ago

for me the month in the hover is correct, but the year is not in sync with the displayed year of the calendar. e.g. Today is 2022-09-11, but month calendar shows September 2023. Double-clicking a date opens up a new calendar which shows that date... but the year is in sync with the Today hover year. The calendar is configured with the years 2022, 2023, and 2024. But 2022 shows up as undefined.

image

mwsmedia commented 1 month ago

Adding the following as a comment on the existing bug report because I think it's the same issue:

When an fc-date property is assigned to a note and the calendar associated is a custom calendar (eg: 394-15-09 00:19), that note shows on the correct month and date in the Calendarium sidebar view... however, clicking on that date to open an Agenda view shows the calendar for a month two previous from the correct one (to use regular months: if the date is 2024-09-18, it shows the Agenda view for 2024-07, with the correct day.

rmasoni commented 4 days ago

In my case, it displays one year ahead.

ScreenShot 2024-11-19 at 01 32 21@2x

The era starts on 17550, so 17702 should be 152, not 153.