daysInYear method
It returns the number of days past in the year.
Args: monthNum (int): The month number (1-12) dayNum (int): The day of the month (1-31) year (int): The year in question.
Implementation
int daysInYear(int year) => leapYear(year) ? 366 : 365;