import toDate from '../toDate/index' ; import requiredArgs from '../_lib/requiredArgs/index' ; name category summary description param { Date | Number } date returns { Boolean } throws example export default function isLeapYear ( dirtyDate ) { requiredArgs ( 1 , arguments ) ; const date = toDate ( dirtyDate ) ; const year = date . getFullYear ( ) ; return year % 400 === 0 || ( year % 4 === 0 && year % 100 !== 0 ) ; }