Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Who does this help?
This satisfies my own needs, and the needs of those expressed in:
Both contain discussions on how to "hack" a solution: appending
EXDATE:
to any other string input that doesn't get sanitized byfoldLine()
.That definitely works. But I thought this was kinda silly. It wouldn't take much to support
EXDATE
, right?Attempt using
DateArray[]
I spent a little time flirting with the idea of defining
excludeDate
as an array ofDateArray[]
, but I realized that it would "imply" the allowance of a mix DATE and DATE-TIME input.Then I started thinking about how I might have it be
[number, number, number][] | [number, number, number, number][] | [number, number, number, number, number][]
. But that seemed ugly.And then we'd have to provide more attributes like
excludeDateInputType
andexcludeDateOutputType
.Keep it simple with a string input
I realized that it was far simpler to let the end user to provide the string themself, like is already expected with
recurrenceRule
.Note on README Doc example
In testing, using MacOS's Calendar App, I found that support for
EXDATE;VALUE=DATE:YYYYMMDD
doesn't work. So, as a result of this test revealing that iCal support is spotty, I removed any mention of it in the README.Testing
I tested EXDATE with MacOS's Calendar App with a recurrence rule calendar.
In this example I had a weekly repeating event on Tuesday at 6pm EDT (-04:00 = 22:00 UTC).
As you can see, the recurring events on July 11 and July 18 are excluded.
(This was really just to make sure that my README examples are correct).
Thanks!
I hope this addition is a decent contribution. I'm proud to say it's not my first to this lovely project (#220)
Please let me know if revisions to the README or anything else is desired. Cheers!