IsLeapYear
IsLeapYear 插件新增 .isLeapYear() API,用於判斷 Dayjs 物件所代表的年份是否為閏年。
javascript
var isLeapYear = require('dayjs/plugin/isLeapYear');
// import isLeapYear from 'dayjs/plugin/isLeapYear' // ES 2015
dayjs.extend(isLeapYear);
dayjs('2000-01-01').isLeapYear(); // true