Moment Calendar
Provides queryable calendar data structure.
Based on moment.js.
Install
$ npm install moment-calendar
Usage
var Calendar = ; var calendar = // name of the property in event objects containing the start date eventStartDate: 'start' // name of the property in event objects containing the end date eventEndDate: 'end' // locale locale: 'en'; // you can reconfigure an existing calendarcalendar; var event = start: // begins now end: + 1000 * 60 * 60 * 24 // ends in one day; // calendar is an array like objectcalendar; // returns new calendar containing events within the year 2014var eventsIn2014 = calendar; // events are always sorted by theire start date // by chaining you can get as granular as you needvar events = calendar; // you can also query ranges, a new calendar is returnedvar eventsInRange = calendar; // returns a list of months, the list items are calendar instances toovar months = calendar; months;