IsLeapYear
IsLeapYear 플러그인은 .isLeapYear
API를 추가하여 Dayjs
객체가 나타내는 연도가 윤년인지 여부를 boolean
값으로 반환합니다.
javascript
var isLeapYear = require('dayjs/plugin/isLeapYear');
// import isLeapYear from 'dayjs/plugin/isLeapYear' // ES 2015
dayjs.extend(isLeapYear);
dayjs('2000-01-01').isLeapYear(); // true