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

Function d_before_mon

src/clock.rs:58–69  ·  view source on GitHub ↗

This function provides the ability to display the day before the month.

(year: u64, month: u64)

Source from the content-addressed store, hash-verified

56
57// This function provides the ability to display the day before the month.
58fn d_before_mon(year: u64, month: u64) -> u64
59{
60 let leapd = leapyr(year) && month > 2;
61 D_BEFORE_MON[(month as usize) - 1] + if leapd
62 {
63 1
64 }
65 else
66 {
67 0
68 }
69}
70
71
72// This function will determine if a given year is a leap-year.

Callers 1

realtimeFunction · 0.85

Calls 1

leapyrFunction · 0.85

Tested by

no test coverage detected