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/dist/index.d.cts
CHANGED
|
@@ -1533,6 +1533,11 @@ declare class ICalEvent {
|
|
|
1533
1533
|
* [readme](https://github.com/sebbo2002/ical-generator#-date-time--timezones)
|
|
1534
1534
|
* for details about supported values and timezone handling.
|
|
1535
1535
|
*
|
|
1536
|
+
* For all-day events, the recurrence id is emitted as an RFC 5545 DATE
|
|
1537
|
+
* value (`RECURRENCE-ID;VALUE=DATE:YYYYMMDD`), matching the event's
|
|
1538
|
+
* `DTSTART;VALUE=DATE` format. For timed events, the usual date-time
|
|
1539
|
+
* format is used.
|
|
1540
|
+
*
|
|
1536
1541
|
* @since 0.2.0
|
|
1537
1542
|
*/
|
|
1538
1543
|
recurrenceId(recurrenceId: ICalDateTimeValue | null): this;
|
|
@@ -1594,6 +1599,45 @@ declare class ICalEvent {
|
|
|
1594
1599
|
* END:VCALENDAR
|
|
1595
1600
|
* ```
|
|
1596
1601
|
*
|
|
1602
|
+
* For all-day events, the `until` date is emitted as an RFC 5545 DATE value
|
|
1603
|
+
* (`UNTIL=YYYYMMDD` without time), matching the event's `DTSTART;VALUE=DATE`
|
|
1604
|
+
* format:
|
|
1605
|
+
*
|
|
1606
|
+
* ```typescript
|
|
1607
|
+
* import ical, { ICalEventRepeatingFreq } from 'ical-generator';
|
|
1608
|
+
*
|
|
1609
|
+
* const cal = ical();
|
|
1610
|
+
*
|
|
1611
|
+
* const event = cal.createEvent({
|
|
1612
|
+
* allDay: true,
|
|
1613
|
+
* start: new Date('2025-03-10'),
|
|
1614
|
+
* summary: 'Repeating All-Day Event'
|
|
1615
|
+
* });
|
|
1616
|
+
* event.repeating({
|
|
1617
|
+
* freq: ICalEventRepeatingFreq.WEEKLY,
|
|
1618
|
+
* until: new Date('2025-03-24')
|
|
1619
|
+
* });
|
|
1620
|
+
*
|
|
1621
|
+
* cal.toString();
|
|
1622
|
+
* ```
|
|
1623
|
+
*
|
|
1624
|
+
* ```text
|
|
1625
|
+
* BEGIN:VCALENDAR
|
|
1626
|
+
* VERSION:2.0
|
|
1627
|
+
* PRODID:-//sebbo.net//ical-generator//EN
|
|
1628
|
+
* BEGIN:VEVENT
|
|
1629
|
+
* UID:d21d3ff4-73c2-4e12-ae45-fb1baf488292
|
|
1630
|
+
* SEQUENCE:0
|
|
1631
|
+
* DTSTAMP:20261116T171008Z
|
|
1632
|
+
* DTSTART;VALUE=DATE:20250310
|
|
1633
|
+
* X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
|
|
1634
|
+
* X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE
|
|
1635
|
+
* RRULE:FREQ=WEEKLY;UNTIL=20250324
|
|
1636
|
+
* SUMMARY:Repeating All-Day Event
|
|
1637
|
+
* END:VEVENT
|
|
1638
|
+
* END:VCALENDAR
|
|
1639
|
+
* ```
|
|
1640
|
+
*
|
|
1597
1641
|
* @since 0.2.0
|
|
1598
1642
|
*/
|
|
1599
1643
|
repeating(repeating: ICalRepeatingOptions | null): this;
|
package/dist/index.d.mts
CHANGED
|
@@ -1533,6 +1533,11 @@ declare class ICalEvent {
|
|
|
1533
1533
|
* [readme](https://github.com/sebbo2002/ical-generator#-date-time--timezones)
|
|
1534
1534
|
* for details about supported values and timezone handling.
|
|
1535
1535
|
*
|
|
1536
|
+
* For all-day events, the recurrence id is emitted as an RFC 5545 DATE
|
|
1537
|
+
* value (`RECURRENCE-ID;VALUE=DATE:YYYYMMDD`), matching the event's
|
|
1538
|
+
* `DTSTART;VALUE=DATE` format. For timed events, the usual date-time
|
|
1539
|
+
* format is used.
|
|
1540
|
+
*
|
|
1536
1541
|
* @since 0.2.0
|
|
1537
1542
|
*/
|
|
1538
1543
|
recurrenceId(recurrenceId: ICalDateTimeValue | null): this;
|
|
@@ -1594,6 +1599,45 @@ declare class ICalEvent {
|
|
|
1594
1599
|
* END:VCALENDAR
|
|
1595
1600
|
* ```
|
|
1596
1601
|
*
|
|
1602
|
+
* For all-day events, the `until` date is emitted as an RFC 5545 DATE value
|
|
1603
|
+
* (`UNTIL=YYYYMMDD` without time), matching the event's `DTSTART;VALUE=DATE`
|
|
1604
|
+
* format:
|
|
1605
|
+
*
|
|
1606
|
+
* ```typescript
|
|
1607
|
+
* import ical, { ICalEventRepeatingFreq } from 'ical-generator';
|
|
1608
|
+
*
|
|
1609
|
+
* const cal = ical();
|
|
1610
|
+
*
|
|
1611
|
+
* const event = cal.createEvent({
|
|
1612
|
+
* allDay: true,
|
|
1613
|
+
* start: new Date('2025-03-10'),
|
|
1614
|
+
* summary: 'Repeating All-Day Event'
|
|
1615
|
+
* });
|
|
1616
|
+
* event.repeating({
|
|
1617
|
+
* freq: ICalEventRepeatingFreq.WEEKLY,
|
|
1618
|
+
* until: new Date('2025-03-24')
|
|
1619
|
+
* });
|
|
1620
|
+
*
|
|
1621
|
+
* cal.toString();
|
|
1622
|
+
* ```
|
|
1623
|
+
*
|
|
1624
|
+
* ```text
|
|
1625
|
+
* BEGIN:VCALENDAR
|
|
1626
|
+
* VERSION:2.0
|
|
1627
|
+
* PRODID:-//sebbo.net//ical-generator//EN
|
|
1628
|
+
* BEGIN:VEVENT
|
|
1629
|
+
* UID:d21d3ff4-73c2-4e12-ae45-fb1baf488292
|
|
1630
|
+
* SEQUENCE:0
|
|
1631
|
+
* DTSTAMP:20261116T171008Z
|
|
1632
|
+
* DTSTART;VALUE=DATE:20250310
|
|
1633
|
+
* X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
|
|
1634
|
+
* X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE
|
|
1635
|
+
* RRULE:FREQ=WEEKLY;UNTIL=20250324
|
|
1636
|
+
* SUMMARY:Repeating All-Day Event
|
|
1637
|
+
* END:VEVENT
|
|
1638
|
+
* END:VCALENDAR
|
|
1639
|
+
* ```
|
|
1640
|
+
*
|
|
1597
1641
|
* @since 0.2.0
|
|
1598
1642
|
*/
|
|
1599
1643
|
repeating(repeating: ICalRepeatingOptions | null): this;
|
package/dist/index.mjs
CHANGED
|
@@ -35,11 +35,12 @@ let e=/* @__PURE__ */ function(e){return e.DAILY=`DAILY`,e.HOURLY=`HOURLY`,e.MIN
|
|
|
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?`
|