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

Type of RecurrencePattern.Until is CalDateTime #723

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

axunonb
Copy link
Collaborator

@axunonb axunonb commented Feb 11, 2025

Changed type of RecurrencePattern.Until from DateTime to CalDateTime
Change ArgumentException to ArgumentOutOfRangeException in RecurrencePatternSerializer

Resolves #588
Resolves #653

@axunonb axunonb force-pushed the pr/recurrence-pattern-until branch 2 times, most recently from 35001b2 to b54664d Compare February 11, 2025 10:06
@axunonb axunonb requested a review from minichma February 11, 2025 10:12
minichma
minichma previously approved these changes Feb 11, 2025
: untilCalDt.ToTimeZone(reference.TzId).Value;
? untilCalDt
// convert to the reference timezone and convert the value to Floating
: untilCalDt.ToTimeZone(reference.TzId).Value.AsCalDateTime();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a more elegant way of converting between floating and non-floating. Can't we write .ToTimeZone(null)? I feel that we should actually have something like CalDateTime.AsFloating() and CalDateTime.WithZoned(tzId) (which is not a topic of this PR and which is in contrast to my comments in a previous discussion - I know)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG, of course, this is implemented already: ToTimeZone(reference.TzId).ToTimeZone(null), as simple as that 👍

Update ArgumentException to ArgumentOutOfRangeException in RecurrencePatternSerializer
@axunonb axunonb force-pushed the pr/recurrence-pattern-until branch from 1f622ab to 6a9ba25 Compare February 11, 2025 17:35
Copy link

@axunonb axunonb merged commit 7c14ce2 into ical-org:main Feb 11, 2025
4 checks passed
@axunonb axunonb deleted the pr/recurrence-pattern-until branch February 11, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants