ical-generator 3.4.2-develop.2 → 3.4.2-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 +10 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,13 +38,16 @@ to generate subscriptionable calendar feeds.
|
|
|
38
38
|
## ⚡️ Quick Start
|
|
39
39
|
|
|
40
40
|
```javascript
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const ical = require('ical-generator');
|
|
42
|
+
const http = require('http');
|
|
43
43
|
|
|
44
44
|
const calendar = ical({name: 'my first iCal'});
|
|
45
|
+
const startTime = new Date();
|
|
46
|
+
const endTime = new Date();
|
|
47
|
+
endTime.setHours(startTime.getHours()+1);
|
|
45
48
|
calendar.createEvent({
|
|
46
|
-
start:
|
|
47
|
-
end:
|
|
49
|
+
start: startTime,
|
|
50
|
+
end: endTime,
|
|
48
51
|
summary: 'Example Event',
|
|
49
52
|
description: 'It works ;)',
|
|
50
53
|
location: 'my room',
|
|
@@ -56,6 +59,7 @@ http.createServer((req, res) => calendar.serve(res))
|
|
|
56
59
|
console.log('Server running at http://127.0.0.1:3000/');
|
|
57
60
|
});
|
|
58
61
|
```
|
|
62
|
+
See the [examples](./examples) folder for more examples.
|
|
59
63
|
|
|
60
64
|
## 📑 API-Reference
|
|
61
65
|
|
|
@@ -69,8 +73,8 @@ http.createServer((req, res) => calendar.serve(res))
|
|
|
69
73
|
## 🕒 Date, Time & Timezones
|
|
70
74
|
|
|
71
75
|
ical-generator supports [native Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date),
|
|
72
|
-
[
|
|
73
|
-
[
|
|
76
|
+
[Day.js](https://day.js.org/en/), [Luxon's](https://moment.github.io/luxon/) [DateTime](https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html)
|
|
77
|
+
and the older [moment.js](https://momentjs.com/) and [moment-timezone](https://momentjs.com/timezone/)
|
|
74
78
|
objects. You can also pass a string which is then passed to javascript's `Date` internally.
|
|
75
79
|
|
|
76
80
|
It is recommended to use UTC time as far as possible. `ical-generator` will output all time information as UTC time as
|
package/package.json
CHANGED