code: public static long fieldsToDay(int year, int month, int dom) {
          int y = year - 1;
          long julian =
              365 * y + floorDivide(y, 4) + (JULIAN_1_CE - 3) +    // Julian cal
              floorDivide(y, 400) - floorDivide(y, 100) + 2 +   // => Gregorian cal
              DAYS_BEFORE[month + (isLeapYear(year) ? 12 : 0)] + dom; // => month/dom
          return julian - JULIAN_1970_CE; // JD => epoch day
      }
docs: Convert a year, month, and day-of-month, given in the proleptic
  Gregorian calendar, to 1970 epoch days.
  @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
  @param month 0-based month, with 0==Jan
  @param dom 1-based day of month
  @return the day number, with day 0 == Jan 1 1970