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

🐞 Event Intervals #147

Open
3 of 7 tasks
P13L0v3r opened this issue Oct 22, 2024 · 2 comments
Open
3 of 7 tasks

🐞 Event Intervals #147

P13L0v3r opened this issue Oct 22, 2024 · 2 comments

Comments

@P13L0v3r
Copy link

P13L0v3r commented Oct 22, 2024

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

There should be an "Add Interval" button in the event creation modal, as per the documentation

Current behaviour

There is no such button

Reproduction

Create a new calendar, create a new event, see no button.

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

1.7.4 and 1.5.8

Plugin Version

1.4.0

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

No response

@P13L0v3r
Copy link
Author

I want to add an event that occurs every number of days, but the only recurring options are every year, every month, or every day. The documentation states that there should be an "Add Interval" button when you create an event but I can't find it. There's also no tag when you create a note event.

@ZapEm
Copy link

ZapEm commented Nov 20, 2024

+1

I was looking for the same feature (event on 30th, recurring every 3 months) and tried via UI and notes.

The "Recurring" button in the event creation dialog was confusing: I understood the appearing input as the interval setting, but I could not get it to behave accordingly.

When playing around in a note/frontmatter, I managed to create an event that was recurring on 1. day in the 1. month, 2. day in 2. month, n-th day in n-th month. This is when I looked into the code.

This cache update functions seems to have a (semi related) bug here:
https://github.com/javalent/calendarium/blob/c8302e41004aeb8e734b9d1dfc2e571287d46fe9/src/stores/cache/event-cache.ts#L214C1-L219C26

const start = date.day[0] ?? this.month;
const end = date.day[1] ?? this.month;

When there is no date.day[x], it defaults to this.month. I assume that should be this.day.

I might be misunderstanding it's purpose of the RecurringCalEventDateBit, but to me it looks like Range and Recurring got mixed up here. I'm wondering if the second item in the array was always supposed to be the end date, could we not have put in intervals here and kept the end date input separately?

image
In my ideal case, I would read this as: "Starting from the last Day of the 3rd Month of the 10th Year, repeat every 3 months (until a potential end-date entered separately)"

In the end a simple interval input with integer day|month|year might be better suited, together with plain start and end dates.

Then a Range is just a Recurring with interval defaulted to 1 day
And for Recurring it could additionally check for every date between start and end to also match the interval by something like e.g. ((this.month - start.month) % interval) === 0 if the interval unit was set to month.

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

2 participants