code: public static int dayOfYear(int year, int month, int date) {
          int leapAdjust = month > 2 && isLeapYear(year) ? 1 : 0;
          return MONTH_START_TO_DOY[month - 1] + leapAdjust + date - 1;
      }
docs: the day of the year in [0-365] of the given date.