epszaw / dayjs-calendar-month

⏰ Unofficial Day.js plugin to get month calendar range

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

⏰ Unofficial Day.js plugin to get month calendar range

License:MIT License


Languages

Language:JavaScript 100.0%