@greenants/event-creator

1.0.0 • Public • Published

Event Creator

Usage:

const eventCreator = require('event-creator')

const events = eventCreator({
    title: 'Beer time!',
    startTime: '16:30', // local time
    endTime: '18:00'    // local time
}, d => d.isFirst('friday') || d.isThird('friday') || d.isFifth('friday'))


console.log(events)
// times are in UTC
// [{
//    "title": "Beer time!",
//    "startTime": "2021-11-05T15:30:00.000Z", 
//    "endTime": "2021-11-05T17:00:00.000Z", 
//  },
//  {
//    "title": "Beer time!",
//    "startTime": "2021-11-19T15:30:00.000Z", 
//    "endTime": "2021-11-19T17:00:00.000Z", 
// }]

Readme

Keywords

none

Package Sidebar

Install

npm i @greenants/event-creator

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

5.74 kB

Total Files

7

Last publish

Collaborators

  • greenants