import { hooks } from '../utils/hooks';
import isFunction from '../utils/is-function';
import { daysInMonth } from '../units/month';
-import { isLeapYear } from '../units/year';
+import { isLeapYear } from '../utils/is-leap-year';
export function makeGetSet (unit, keepTime) {
return function (value) {
import indexOf from '../utils/index-of';
import { createUTC } from '../create/utc';
import getParsingFlags from '../create/parsing-flags';
-import { isLeapYear } from '../units/year';
+import { isLeapYear } from '../utils/is-leap-year';
export function daysInMonth(year, month) {
if (isNaN(year) || isNaN(month)) {
import { addUnitPriority } from './priorities';
import { addRegexToken, match1to2, match1to4, match1to6, match2, match4, match6, matchSigned } from '../parse/regex';
import { addParseToken } from '../parse/token';
+import { isLeapYear } from '../utils/is-leap-year';
import { hooks } from '../utils/hooks';
import { YEAR } from './constants';
import toInt from '../utils/to-int';
return isLeapYear(year) ? 366 : 365;
}
-export function isLeapYear(year) {
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
-}
+export { isLeapYear };
// HOOKS
--- /dev/null
+export function isLeapYear(year) {
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+}