MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / leapyr

Function leapyr

src/clock.rs:73–91  ·  view source on GitHub ↗

This function will determine if a given year is a leap-year.

(year: u64)

Source from the content-addressed store, hash-verified

71
72// This function will determine if a given year is a leap-year.
73fn leapyr(year: u64) -> bool
74{
75 if year % 4 != 0
76 {
77 false
78 }
79 else if year % 100 != 0
80 {
81 true
82 }
83 else if year % 400 != 0
84 {
85 false
86 }
87 else
88 {
89 true
90 }
91}

Callers 2

d_before_yrFunction · 0.85
d_before_monFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected