ical-generator 11.1.4-develop.2 → 11.1.4-develop.4
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 +48 -18
- package/dist/index.d.mts +48 -18
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/event.ts +76 -15
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@types/node": "^26.6.6",
|
|
22
22
|
"c8": "^12.0.0",
|
|
23
23
|
"dayjs": "^1.11.23",
|
|
24
|
-
"eslint": "^10.
|
|
24
|
+
"eslint": "^10.14.0",
|
|
25
25
|
"eslint-config-prettier": "^10.1.8",
|
|
26
26
|
"eslint-plugin-jsonc": "^3.3.0",
|
|
27
27
|
"eslint-plugin-perfectionist": "^5.13.0",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"semantic-release": "^25.0.7",
|
|
41
41
|
"semantic-release-license": "^1.0.2",
|
|
42
42
|
"source-map-support": "^0.5.21",
|
|
43
|
-
"temporal-polyfill": "^1.0.
|
|
44
|
-
"tsdown": "^0.23.
|
|
43
|
+
"temporal-polyfill": "^1.0.8",
|
|
44
|
+
"tsdown": "^0.23.7",
|
|
45
45
|
"tsx": "^4.23.13",
|
|
46
46
|
"typedoc": "^0.28.20",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
@@ -141,5 +141,5 @@
|
|
|
141
141
|
"test": "mocha"
|
|
142
142
|
},
|
|
143
143
|
"type": "module",
|
|
144
|
-
"version": "11.1.4-develop.
|
|
144
|
+
"version": "11.1.4-develop.4"
|
|
145
145
|
}
|
package/src/event.ts
CHANGED
|
@@ -1007,6 +1007,11 @@ export default class ICalEvent {
|
|
|
1007
1007
|
* [readme](https://github.com/sebbo2002/ical-generator#-date-time--timezones)
|
|
1008
1008
|
* for details about supported values and timezone handling.
|
|
1009
1009
|
*
|
|
1010
|
+
* For all-day events, the recurrence id is emitted as an RFC 5545 DATE
|
|
1011
|
+
* value (`RECURRENCE-ID;VALUE=DATE:YYYYMMDD`), matching the event's
|
|
1012
|
+
* `DTSTART;VALUE=DATE` format. For timed events, the usual date-time
|
|
1013
|
+
* format is used.
|
|
1014
|
+
*
|
|
1010
1015
|
* @since 0.2.0
|
|
1011
1016
|
*/
|
|
1012
1017
|
recurrenceId(recurrenceId: ICalDateTimeValue | null): this;
|
|
@@ -1082,6 +1087,45 @@ export default class ICalEvent {
|
|
|
1082
1087
|
* END:VCALENDAR
|
|
1083
1088
|
* ```
|
|
1084
1089
|
*
|
|
1090
|
+
* For all-day events, the `until` date is emitted as an RFC 5545 DATE value
|
|
1091
|
+
* (`UNTIL=YYYYMMDD` without time), matching the event's `DTSTART;VALUE=DATE`
|
|
1092
|
+
* format:
|
|
1093
|
+
*
|
|
1094
|
+
* ```typescript
|
|
1095
|
+
* import ical, { ICalEventRepeatingFreq } from 'ical-generator';
|
|
1096
|
+
*
|
|
1097
|
+
* const cal = ical();
|
|
1098
|
+
*
|
|
1099
|
+
* const event = cal.createEvent({
|
|
1100
|
+
* allDay: true,
|
|
1101
|
+
* start: new Date('2025-03-10'),
|
|
1102
|
+
* summary: 'Repeating All-Day Event'
|
|
1103
|
+
* });
|
|
1104
|
+
* event.repeating({
|
|
1105
|
+
* freq: ICalEventRepeatingFreq.WEEKLY,
|
|
1106
|
+
* until: new Date('2025-03-24')
|
|
1107
|
+
* });
|
|
1108
|
+
*
|
|
1109
|
+
* cal.toString();
|
|
1110
|
+
* ```
|
|
1111
|
+
*
|
|
1112
|
+
* ```text
|
|
1113
|
+
* BEGIN:VCALENDAR
|
|
1114
|
+
* VERSION:2.0
|
|
1115
|
+
* PRODID:-//sebbo.net//ical-generator//EN
|
|
1116
|
+
* BEGIN:VEVENT
|
|
1117
|
+
* UID:d21d3ff4-73c2-4e12-ae45-fb1baf488292
|
|
1118
|
+
* SEQUENCE:0
|
|
1119
|
+
* DTSTAMP:20261116T171008Z
|
|
1120
|
+
* DTSTART;VALUE=DATE:20250310
|
|
1121
|
+
* X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
|
|
1122
|
+
* X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE
|
|
1123
|
+
* RRULE:FREQ=WEEKLY;UNTIL=20250324
|
|
1124
|
+
* SUMMARY:Repeating All-Day Event
|
|
1125
|
+
* END:VEVENT
|
|
1126
|
+
* END:VCALENDAR
|
|
1127
|
+
* ```
|
|
1128
|
+
*
|
|
1085
1129
|
* @since 0.2.0
|
|
1086
1130
|
*/
|
|
1087
1131
|
repeating(repeating: ICalRepeatingOptions | null): this;
|
|
@@ -1639,14 +1683,24 @@ export default class ICalEvent {
|
|
|
1639
1683
|
}
|
|
1640
1684
|
|
|
1641
1685
|
if (this.data.repeating.until) {
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1686
|
+
if (this.data.allDay) {
|
|
1687
|
+
g +=
|
|
1688
|
+
';UNTIL=' +
|
|
1689
|
+
formatDate(
|
|
1690
|
+
this.timezone(),
|
|
1691
|
+
this.data.repeating.until,
|
|
1692
|
+
true,
|
|
1693
|
+
);
|
|
1694
|
+
} else {
|
|
1695
|
+
g +=
|
|
1696
|
+
';UNTIL=' +
|
|
1697
|
+
formatDate(
|
|
1698
|
+
this.calendar.timezone(),
|
|
1699
|
+
this.data.repeating.until,
|
|
1700
|
+
false,
|
|
1701
|
+
this.floating(),
|
|
1702
|
+
);
|
|
1703
|
+
}
|
|
1650
1704
|
}
|
|
1651
1705
|
|
|
1652
1706
|
if (this.data.repeating.byDay) {
|
|
@@ -1727,13 +1781,20 @@ export default class ICalEvent {
|
|
|
1727
1781
|
|
|
1728
1782
|
// RECURRENCE
|
|
1729
1783
|
if (this.data.recurrenceId) {
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1784
|
+
if (this.data.allDay) {
|
|
1785
|
+
g +=
|
|
1786
|
+
'RECURRENCE-ID;VALUE=DATE:' +
|
|
1787
|
+
formatDate(this.timezone(), this.data.recurrenceId, true) +
|
|
1788
|
+
'\r\n';
|
|
1789
|
+
} else {
|
|
1790
|
+
g +=
|
|
1791
|
+
formatDateTZ(
|
|
1792
|
+
this.timezone(),
|
|
1793
|
+
'RECURRENCE-ID',
|
|
1794
|
+
this.data.recurrenceId,
|
|
1795
|
+
this.data,
|
|
1796
|
+
) + '\r\n';
|
|
1797
|
+
}
|
|
1737
1798
|
}
|
|
1738
1799
|
|
|
1739
1800
|
// SUMMARY
|