mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 16:26:47 +08:00
Updated Syntax
This commit is contained in:
@ -21,7 +21,7 @@ const getMonthDays = (monthNumber, year) => {
|
|||||||
if (the30DaysMonths.includes(monthNumber)) { return 30 }
|
if (the30DaysMonths.includes(monthNumber)) { return 30 }
|
||||||
|
|
||||||
// Check for Leap year
|
// Check for Leap year
|
||||||
if (((year % 400) === 0)||(((year % 100) != 0) && ((year % 4) === 0))) { return 29 }
|
if (((year % 400) === 0) || (((year % 100) !== 0) && ((year % 4) === 0))) { return 29 }
|
||||||
|
|
||||||
return 28
|
return 28
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user