1.0.1 • Published 7 years ago

calendar-pager v1.0.1

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

Calendar Pager

npm version Build Status

Utility for getting calendar dates with moment.

Dependencies

  • moment
  • moment-range

Installation

$ npm i --save calendar-pager

Usage

import calendar from 'calendar-pager';

// Get calendar dates of this month.
const {
  current, // start of month
  range,   // moment-range
  prev,    // start of prev month
  next     // start of next month
} = calendar();

// Get calendar dates of prev month.
const prevPayload = calendar(prev);

// Get calendar dates of next month.
const nextPayload = calendar(next);

// Get calendar starting with Monday.
const payload = calendar(next, true);

LICENSE

MIT

1.0.1

7 years ago

1.0.0

7 years ago