This function provides the ability to display the day before the year.
(year: u64)
| 39 | |
| 40 | // This function provides the ability to display the day before the year. |
| 41 | fn 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. |