Java LocalDate Calculate minusDaysAdjustedToStartOfDay(LocalDate ld, int days)

Here you can find the source of minusDaysAdjustedToStartOfDay(LocalDate ld, int days)

Description

Takes the LocalDate, subtracts the day indicated from it, and adjusts it to Midnight (start of day).

License

Open Source License

Parameter

Parameter Description
ld a parameter
days a parameter

Exception

Parameter Description
Exception an exception

Declaration

public static LocalDateTime minusDaysAdjustedToStartOfDay(LocalDate ld, int days) throws Exception 

Method Source Code


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

import java.time.*;

public class Main {
    /**//from   w ww .  j  a  v  a  2  s .co  m
     * Takes the LocalDate, subtracts the day indicated from it, and
     * adjusts it to Midnight (start of day).
     *
     * @param ld
     * @param days
     * @return
     * @throws Exception
     */
    public static LocalDateTime minusDaysAdjustedToStartOfDay(LocalDate ld, int days) throws Exception {
        return ld.minusDays(days).atStartOfDay();
    }
}

Related

  1. localDate2ms(final LocalDate ld)
  2. LocalDateFromMilli(long value)
  3. localDateToSystemAdjustedStartOfDayDate(LocalDate d)
  4. max(ChronoLocalDate date1, ChronoLocalDate date2)
  5. medTime(LocalDate date, String text)
  6. newToOld(LocalDate d)
  7. next(Predicate p)
  8. normalizedYear(LocalDate d)
  9. obtenirLocalDateAPartirDUneDate(Date date)