This commit is contained in:
Alexander Heldt
2025-11-01 12:12:45 +01:00
parent 19f0270202
commit 96f2d570b1
9 changed files with 196 additions and 0 deletions

7
leap/src/leap.gleam Normal file
View File

@@ -0,0 +1,7 @@
pub fn is_leap_year(year: Int) -> Bool {
let divisible_by_4 = year % 4 == 0
let divisible_by_100 = year % 100 == 0
let divisible_by_400 = year % 400 == 0
{ divisible_by_4 && !divisible_by_100 } || divisible_by_400
}