Java LocalDate Calculate getDateStart(LocalDate localDate)

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

Description

get Date Start

License

Apache License

Declaration

public static Date getDateStart(LocalDate localDate) 

Method Source Code

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

import java.time.*;

import java.util.Date;

public class Main {

    public static Date getDateStart(LocalDate localDate) {
        LocalDateTime localDateTime = localDate.atStartOfDay();
        ZonedDateTime zonedDateTime = localDateTime.atZone(ZoneId.of("Asia/Shanghai"));
        return Date.from(zonedDateTime.toInstant());
    }//from  w  w w  .  j  a v  a  2  s .  com
}

Related

  1. getDate(ChronoLocalDate date)
  2. getDate(Console console, Function validator)
  3. getDate(final LocalDate localDate)
  4. getDate(LocalDate d, String tzId)
  5. getDateCriteria(LocalDate startDate, LocalDate endDate)
  6. getEndDateOfMonth(LocalDate date)
  7. getFirstDayOfTheMonth(final LocalDate date)
  8. getLastDayInMonth(LocalDate localDate)
  9. getLastDayOfTheQuarter(final LocalDate date)