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

Function d_before_yr

src/clock.rs:41–54  ·  view source on GitHub ↗

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

(year: u64)

Source from the content-addressed store, hash-verified

39
40// This function provides the ability to display the day before the year.
41fn d_before_yr(year: u64) -> u64
42{
43 (1970..year).fold(0, |days, y|
44 {
45 days + if leapyr(y)
46 {
47 366
48 }
49 else
50 {
51 365
52 }
53 })
54}
55
56
57// This function provides the ability to display the day before the month.

Callers 1

realtimeFunction · 0.85

Calls 1

leapyrFunction · 0.85

Tested by

no test coverage detected