This function provides the ability to display the day before the month.
(year: u64, month: u64)
| 56 | |
| 57 | // This function provides the ability to display the day before the month. |
| 58 | fn 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. |