First/Last day of the week/month/year
Alsan opened this issue · comments
How can I recurrent an event for fist/last day of the week/month/year?
That's not currently supported. Good idea though.
Second this. Similarly, I don't believe there's a way to add an event that's on "every second Monday of the month", for example.
I would like to track when Mother's Day is on each year, but I don't believe this is possible with the current parser version.
Are you open to pull requests, @kochrt?
I am, you might try starting here https://github.com/mark-when/parser/blob/main/src/dateRange/checkRecurrence.ts
I guess the syntax would be something like (range) every [first|second|third|last] (dayOfWeek) (amount)
?
2023-04-07 every first friday x100
2023-04-07 every other friday for 1 year
2023-04-07 every last monday
A good question would be whether the initial date should be shown or included in the recurrence if it doesn't follow its own recurrence - like if it was 2023-04-13 every monday
but 2023-04-13
is a Thursday.
It could get a bit complicated if we did annual dates too:
every May 14
every first Monday in September (??)
This is an aside but another thing I want to add is til
or until
instead of specifying a specific number of times:
2023-04-07 every friday until 2024-01-01