yearsToDays static method

int yearsToDays(
  1. int years
)

Implementation

static int yearsToDays(int years) {
  int days = 0;
  for (int year = 0; year < years; year++) {
    days += isLeapYear(year) ? 366 : 365;
  }
  return days;
}