Skip to content

Commit 664da39

Browse files
committed
update leap year function
1 parent 96d1d68 commit 664da39

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: Project-Euler/Problem019.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
*
1717
* @author ddaniel27
1818
*/
19-
20-
// Check if a year is a leap year
21-
// A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.
22-
function isLeapYear(year) {
23-
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0
24-
}
19+
import { isLeapYear } from '../Maths/LeapYear'
2520

2621
function problem19() {
2722
let sundaysCount = 0 // Count of Sundays

0 commit comments

Comments
 (0)