Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontmatter Megathread #4

Open
1 of 3 tasks
sigrunixia opened this issue May 16, 2023 · 3 comments
Open
1 of 3 tasks

Frontmatter Megathread #4

sigrunixia opened this issue May 16, 2023 · 3 comments

Comments

@sigrunixia
Copy link
Member

sigrunixia commented May 16, 2023

For @namtrah

I have used the UI to create an event in the Exandrian Calendar. The date saved was reoccurring and was the 13th day of Quen'pillar of the year 807.

It was linked to a specific Note and saved with a name.

When I turned on the option "Write event date to Frontmatter" it saves the date as follows: fc-date: 814-8-13, which is one month earlier (Fessuran).


Reply-1:

I have noticed in the static.months array, it numbers the months starting at 0 instead of 1. Could this be the cause of it listing the month number as 1 month earlier?


Reply-2:

Either way, the generation of frontmatter dates is not in line with the interpretation of frontmatter dates - indeed due to array numbering.


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.

  • Fixed
  • Not Fixed
  • Wont Fix
@sigrunixia sigrunixia changed the title Namtrah's Frontmatter Issues Frontmatter Megathread May 16, 2023
@sigrunixia sigrunixia pinned this issue May 16, 2023
@sigrunixia
Copy link
Member Author

sigrunixia commented May 16, 2023

Control Reoccurring Events in Frontmatter

@namtrah
Have debugged it to realize it was User Error. But I found that what I want just doesn't exist in the frontmatter for FC.

Would like to use this now to reopen as a feature request to add some sort of front matter so that with a fc-date: YYYY-MM-DD and a second option fc-every: nnn meaning the number of days fc-date reocurrs.

I know it is maybe difficult, But just want to expose the functionality in the UI of allowing an event to happen every n days. This could be useful to add then such things as Birthdays of characters (or real live people) in Frontmatter without having to use the UI.

@WovenTales
+1, and for the same purpose. It doesn't make much sense to be marking birthdays before the character is born (even if I could get the structured-date-object syntax to show up on the calendar).

I'm not sure counting days is the final solution, though; how does that handle years with different numbers of days? Still, an fc-every: 1y seems like it would do really well.

EDIT: Though, I guess that would have its own issues in what to do if you want something to repeat every year on February 29

  • Yay
  • Nay
  • Implemented

@ckennedy666
Copy link

In the real world my anniversary is every 4 years on February 29th. Sometimes just let leap day be leap day.

@sigrunixia sigrunixia unpinned this issue May 17, 2023
@ebullient
Copy link
Contributor

ebullient commented May 21, 2023

For any wonky calendar with intercalary days, the safer bet will be to use month/day names instead of numbers if you don't want to learn the name-to-index mapping.

Harptos numbering gets real weird because Greengrass and sometimes Shieldmeet, for example.

There is an alternate date mechanism that is already present (or was). Assuming tests still run, see here for syntax: https://github.com/javalent/the-calendarium/blob/main/test/event.parseFcString.harptos.test.ts

How you cross that with repeating is interesting. But in the case of writing dates back to frontmatter, I think sticking with the long-form for some calendars is going to be more reliable than translating to/from a numerical index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants