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;
}
It’s a method in class LocalDate. what does this expression mean: ((367 * m – 362) /12) ?
search online for the meaning of ‘((367 * m – 362) / 12)’, no answer.