Skip to content

Local timezone offset support - #13

Merged
filecage merged 50 commits into
mainfrom
local-timezone-offset-support
Mar 3, 2026
Merged

filecage merged 50 commits into
mainfrom
local-timezone-offset-support

Conversation

@filecage

@filecage filecage commented Feb 25, 2026 •

Copy link
Copy Markdown
Owner

This PR adds support for timezone validation and two new getter functions:

  • getDateFromDateTime evaluates the DateTime and resolves the date/datetime to the local timezone, fully respecting floating times, UTC times or times referring to a timezone using the TZID property
  • getLocalOffsetForDateTime finds the applicable timezone offset for a DateTime object

This PR also incorporates #12 and #14.

also adds placeholders/throws for unsupported BYxxx parameters
This simplifies the expansion by a ton, because it allows concepts like not creating each day of a month only to then select Sundays (for example).

It also simplifies some branches in the code (like: what to do if the occurences array is empty? is it empty because all dates have been filtered or is it empty because no filter has been set?)

Additionally, each expander is in charge of keeping dates sorted, meaning that those who don't require extra sorting just don't have to apply it while those that might create dates out of sorting can apply it.
@filecage
filecage marked this pull request as ready for review February 27, 2026 17:39
@filecage
filecage merged commit 75499ca into main Mar 3, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant