Skip to content

Conversation

@crispin-kirchner
Copy link

  • add ability to pass TZIDs to start, end and exclusionDates
  • add ability to include time zone definitions in the header. I assume that these are downloaded from elsewhere, therefore they are considered well-formed and are put as-is into the output
  • the responsibility to provide time zone information for each time zone used in events is with the user, there is no validation which checks whether there is a VTIMEZONE for each TZID

fixes #198

@terreng
Copy link

terreng commented Nov 11, 2025

I found one small issue with this PR: TZID shouldn't be added with VALUE=DATE, per the spec

The "TZID" property parameter MUST NOT be applied to DATE properties - Source

Here's how I corrected it: terreng/ics@build-ae3533a...build-3d177a5

Also, while this PR helpfully updates the README to show how to get VTIMEZONE blocks using tzurl.org, for anyone looking to do it locally & synchronously, here's how you can use timezones-ical-library:

import { tzlib_get_ical_block } from 'timezones-ical-library';

...

ics.createEvents(events, {
  timezones: timezones.map(timezone => tzlib_get_ical_block(timezone)[0]).join('\n')
})

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.

how to add timeZones ?

2 participants