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.
Files changed (2) hide show
  1. package/README.md +10 -6
  2. 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
- import ical from 'ical-generator';
42
- import http from 'http';
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: moment(),
47
- end: moment().add(1, 'hour'),
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
- [moment.js](https://momentjs.com/) (and [moment-timezone](https://momentjs.com/timezone/), [Day.js](https://day.js.org/en/) and
73
- [Luxon's](https://moment.github.io/luxon/) [DateTime](https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html)
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
@@ -119,5 +119,5 @@
119
119
  "start": "node ./dist/bin/start.js",
120
120
  "test": "mocha"
121
121
  },
122
- "version": "3.4.2-develop.2"
122
+ "version": "3.4.2-develop.3"
123
123
  }