MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / isLeapYear

Function isLeapYear

Maths/LeapYear.js:16–18  ·  view source on GitHub ↗
(year)

Source from the content-addressed store, hash-verified

14 * @returns {boolean} true if this is a leap year, false otherwise.
15 */
16export const isLeapYear = (year) => {
17 return year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0)
18}

Callers 6

DateToDayFunction · 0.90
getDayDiffMethod · 0.90
generateMonthCalMethod · 0.90
LeapYear.test.jsFile · 0.90
problem19Function · 0.90
getMonthDaysFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected