Java LocalDate Calculate getLastDayInMonth(LocalDate localDate)

Here you can find the source of getLastDayInMonth(LocalDate localDate)

Description

get Last Day In Month

License

Open Source License

Declaration

public static int getLastDayInMonth(LocalDate localDate) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.time.*;

import java.time.temporal.TemporalAdjusters;

public class Main {

    public static int getLastDayInMonth(LocalDate localDate) {
        LocalDate result = localDate.with(TemporalAdjusters.lastDayOfMonth());
        return result.getDayOfMonth();
    }//ww  w  .  j a v  a2s .co m
}

Related

  1. getDate(LocalDate d, String tzId)
  2. getDateCriteria(LocalDate startDate, LocalDate endDate)
  3. getDateStart(LocalDate localDate)
  4. getEndDateOfMonth(LocalDate date)
  5. getFirstDayOfTheMonth(final LocalDate date)
  6. getLastDayOfTheQuarter(final LocalDate date)
  7. getLocalDateBydayAndWeek(LocalDate localDate, int weekNumber, int dayNumber)
  8. getLrsLocalDate(String lbdcDate)
  9. getMax(@Nonnull final LocalDate aDate1, @Nonnull final LocalDate aDate2)