Java LocalDate Calculate lastMonth(LocalDate date)

Here you can find the source of lastMonth(LocalDate date)

Description

last Month

License

Apache License

Declaration

public static int lastMonth(LocalDate date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.time.LocalDate;

public class Main {
    public static int lastMonth(LocalDate date) {
        return date.minusMonths(1).getMonthValue();
    }// w  ww  .j a va  2  s  .  c o  m
}

Related

  1. isNotNullAndAfter(LocalDate localDate1, LocalDate localDate2)
  2. isOverlapping(LocalDate firstStartDate, LocalDate firstEndDate, LocalDate secondStartDate, LocalDate secondEndDate)
  3. isValid(LocalDate ld1, LocalDate ld2, ZoneId zid, Predicate test)
  4. isWeekend(LocalDate date)
  5. isWorkDay(@Nonnull final LocalDate aDate)
  6. localDate2ms(final LocalDate ld)
  7. LocalDateFromMilli(long value)
  8. localDateToSystemAdjustedStartOfDayDate(LocalDate d)
  9. max(ChronoLocalDate date1, ChronoLocalDate date2)