1.0.0 • Published 1 year ago

dayjs-calendar-month v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

dayjs-calendar-month

⏰ Unofficial Day.js plugin to get month calendar range

Install

Install dayjs and the plugin with your favorite package manager:

npm add dayjs dayjs-calendar-month

Usage

Extend dayjs:

import dayjs from "dayjs"
// required to the plugin
import isBetween from "dayjs/plugin/isBetween"
import calendarMonth from "dayjs-calendar-month"

dayjs.extend(isBetween)
dayjs.extend(calendarMonth)

dayjs("2020-01-01").calendarMonth() // array of dayjs instances from 2019-12-29 to 2020-02-01
1.0.0

1 year ago