addMonths method

LocalDateTime addMonths(
  1. int months
)

Return a new LocalDateTime offset by the given number of months.

Implementation

LocalDateTime addMonths(int months) {
  return LocalDateTime(
    year,
    month + months,
    day,
    hour,
    minute,
    second,
    millisecond,
    microsecond,
  );
}