private static int lastDay(int y, int m) {
    switch (m) {
      case 2:
        return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0) ? 29 : 28;
      case 4:
      case 6:
      case 9:
      case 11:
        return 30;
      default:
        return 31;
    }
  }
Adds a given number of months to a date, represented as the number of days since the epoch.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/util/DateTimeUtils.java