> > |
| META TOPICPARENT |
name="CSC121S2023Lab06" |
Helps with the days in a month
- Months Jan, Mar, May, Jul, Aug, Oct, and Dec all have 31 days
- Months Apr, Jun, Sep, and Nov all have 30 days
- Feb has either 28 or 29 days depending on if it is a leap year. (Not all years divisible by 4 are leap years)
- Any year divisible by 400 is a leap year. (So 2000 was a leap year)
- Any year divisible by 100 but not by 400 is not a leap year. (So 1900 was not a leap year)
- All other years divisible by 4 are a leap year. (So 2024 is a leap year)
|