leap
This commit is contained in:
1 parent
19f0270202
commit
96f2d570b1
9 files changed
+196
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user