code: @Override
      public long toEpochDay() {
          long y = year;
          long m = month;
          long total = 0;
          total += 365 * y;
          if (y >= 0) {
              total += (y + 3) / 4 - (y + 99) / 100 + (y + 399) / 400;
          } else {
              total -= y / -4 - y / -100 + y / -400;
          }
          total += ((367 * m - 362) / 12);
          total += day - 1;
          if (m > 2) {
              total--;
              if (isLeapYear() == false) {
                  total--;
              }
          }
          return total - DAYS_0000_TO_1970;
      }
docs: -----------------------------------------------------------------------