Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Add support for dtend and floating dates#1

Draft
simonratner wants to merge 9 commits into
masterfrom
add-dtend
Draft

Add support for dtend and floating dates#1
simonratner wants to merge 9 commits into
masterfrom
add-dtend

Conversation

@simonratner

Copy link
Copy Markdown

PR for local review only; will issue PR to origin repo after.

@nickawilliams nickawilliams left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM once the duration/DST issue is sorted.

Comment thread src/parsestring.ts Outdated
Comment thread test/rrule.test.ts
@simonratner

Copy link
Copy Markdown
Author

once the duration/DST issue is sorted

Actually i belive it is correct; added a test to prove it. Based on this, rrule treats all js dates as zero-offset dates (it ignores the timezone offset and expects all input to be zoneless-UTC). Output is also zoneless-UTC that should be assumed ot be in the local timezone, and must be converted using luxon or similar if you want the output in a particular timezone (or actual UTC).

The end effect of all this is that DST has no effect. The duration of the event is calculated on UTC dates which have no timezone and hence no DST, and they do not end up affecting the output either because the output is returned as local time.

@simonratner

Copy link
Copy Markdown
Author

Btw, reading through jkbrzt#322 and the issue linked from there, there seems to be little chance of getting this merged upstream. DTEND is considered "out of scope" for RRULE.

@simonratner simonratner changed the title Add support for dtend and duration Add support for dtend and floating dates Oct 20, 2019
@simonratner

simonratner commented Oct 20, 2019

Copy link
Copy Markdown
Author

🛑 This PR should not be merged, see instead add-dtend-xxxx pre-built branches based off this.

@andjiev

andjiev commented Sep 25, 2020

Copy link
Copy Markdown

@simonratner what happened with this PR? As I can see from the rrule opened issue, it says feel free to send a pull request for this to get it included.

@simonratner

Copy link
Copy Markdown
Author

This code is in active use. I'll send a PR.

@simonratner

Copy link
Copy Markdown
Author

See jkbrzt#421.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants