ical-generator 11.1.4-develop.2 → 11.1.4-develop.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -0
- package/dist/index.d.mts +44 -0
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/event.ts +76 -15
package/README.md
CHANGED
|
@@ -90,6 +90,10 @@ therefore depends on the server's time zone: `new Date('2026-07-01T09:30:00Z')`
|
|
|
90
90
|
the same output everywhere, pass a `TZDate`, a Luxon `DateTime`, a `moment-timezone` or a Temporal object, or do not
|
|
91
91
|
set a time zone so that the time is written as UTC.
|
|
92
92
|
|
|
93
|
+
For all-day events (`allDay: true`), RFC 5545 DATE values are used everywhere: `DTSTART;VALUE=DATE`,
|
|
94
|
+
`DTEND;VALUE=DATE`, `EXDATE;VALUE=DATE`, and—for recurring events—`RRULE:...;UNTIL=YYYYMMDD` and
|
|
95
|
+
`RECURRENCE-ID;VALUE=DATE` are emitted without time information, in the same format as the event's start date.
|
|
96
|
+
|
|
93
97
|
If a time zone is used, it is also recommended to use a VTimezone generator. Such a function generates a VTimezone entry
|
|
94
98
|
and returns it. For example, `timezones-ical-library` or `@touch4it/ical-timezones` can be used for this:
|
|
95
99
|
|
package/dist/index.cjs
CHANGED
|
@@ -35,11 +35,12 @@
|
|
|
35
35
|
`).filter(e=>e&&!e.startsWith(`DTSTART:`)).join(`\r
|
|
36
36
|
`);!t.includes(`\r
|
|
37
37
|
`)&&!t.startsWith(`RRULE:`)&&(t=`RRULE:`+t),e+=t.trim()+`\r
|
|
38
|
-
`}else this.data.repeating&&(e+=`RRULE:FREQ=`+this.data.repeating.freq,this.data.repeating.count&&(e+=`;COUNT=`+this.data.repeating.count),this.data.repeating.interval&&(e+=`;INTERVAL=`+this.data.repeating.interval),this.data.repeating.until&&(e+=`;UNTIL=`+d(this.calendar.timezone(),this.data.repeating.until,!1,this.floating())),this.data.repeating.byDay&&(e+=`;BYDAY=`+this.data.repeating.byDay.join(`,`)),this.data.repeating.byMonth&&(e+=`;BYMONTH=`+this.data.repeating.byMonth.join(`,`)),this.data.repeating.byMonthDay&&(e+=`;BYMONTHDAY=`+this.data.repeating.byMonthDay.join(`,`)),this.data.repeating.bySetPos&&(e+=`;BYSETPOS=`+this.data.repeating.bySetPos.join(`,`)),this.data.repeating.startOfWeek&&(e+=`;WKST=`+this.data.repeating.startOfWeek),e+=`\r
|
|
38
|
+
`}else this.data.repeating&&(e+=`RRULE:FREQ=`+this.data.repeating.freq,this.data.repeating.count&&(e+=`;COUNT=`+this.data.repeating.count),this.data.repeating.interval&&(e+=`;INTERVAL=`+this.data.repeating.interval),this.data.repeating.until&&(this.data.allDay?e+=`;UNTIL=`+d(this.timezone(),this.data.repeating.until,!0):e+=`;UNTIL=`+d(this.calendar.timezone(),this.data.repeating.until,!1,this.floating())),this.data.repeating.byDay&&(e+=`;BYDAY=`+this.data.repeating.byDay.join(`,`)),this.data.repeating.byMonth&&(e+=`;BYMONTH=`+this.data.repeating.byMonth.join(`,`)),this.data.repeating.byMonthDay&&(e+=`;BYMONTHDAY=`+this.data.repeating.byMonthDay.join(`,`)),this.data.repeating.bySetPos&&(e+=`;BYSETPOS=`+this.data.repeating.bySetPos.join(`,`)),this.data.repeating.startOfWeek&&(e+=`;WKST=`+this.data.repeating.startOfWeek),e+=`\r
|
|
39
39
|
`,this.data.repeating.exclude&&(this.data.allDay?e+=`EXDATE;VALUE=DATE:`+this.data.repeating.exclude.map(e=>d(this.calendar.timezone(),e,!0)).join(`,`)+`\r
|
|
40
40
|
`:(e+=`EXDATE`,this.timezone()?e+=`;TZID=`+this.timezone()+`:`+this.data.repeating.exclude.map(e=>d(this.timezone(),e,!1,!0)).join(`,`)+`\r
|
|
41
41
|
`:e+=`:`+this.data.repeating.exclude.map(e=>d(this.timezone(),e,!1,this.floating())).join(`,`)+`\r
|
|
42
|
-
`)));if(this.data.recurrenceId&&(e
|
|
42
|
+
`)));if(this.data.recurrenceId&&(this.data.allDay?e+=`RECURRENCE-ID;VALUE=DATE:`+d(this.timezone(),this.data.recurrenceId,!0)+`\r
|
|
43
|
+
`:e+=f(this.timezone(),`RECURRENCE-ID`,this.data.recurrenceId,this.data)+`\r
|
|
43
44
|
`),e+=`SUMMARY:`+c(this.data.summary,!1)+`\r
|
|
44
45
|
`,this.data.transparency&&(e+=`TRANSP:`+c(this.data.transparency,!1)+`\r
|
|
45
46
|
`),this.data.location&&`title`in this.data.location&&this.data.location.title&&(e+=`LOCATION:`+c(this.data.location.title+(this.data.location.address?`
|