fantasycalendar / obsidian-fantasy-calendar

MIT License
175 stars 7 forks source link

Incorrect month numbering in auto-frontmatter #107

Open TacoV opened 1 year ago

TacoV commented 1 year ago

Using (as an example) the default Calendar of Harptos, the numbering of dates is inconsistent between frontmatter and the calendar.

If I add an event via the calendar by hand (for say Nightal 15th, 1490), this results in

         "date": {
            "day": 15,
            "month": 16,
            "year": 1490
          },

If I let the plugin create the frontmatter automatically, it adds

---
fc-calendar: Calendar of Harptos
fc-date: 1490-16-15
---

However, if you then delete the event and rescan for events, the event does not return.

To see the event on the right date again, the frontmatter must be like this:

---
fc-calendar: Calendar of Harptos
fc-date: 1490-17-15
---

This is I presume the difference between the month's position in the array vs the month number.

TacoV commented 1 year ago

To add: the frontmatter interpretation is the most logical - it starts at 1-1, where as the frontmatter autogeneration starts the year at 0-1.