Here you can find the source of minusDaysAdjustedToStartOfDay(LocalDate ld, int days)
Parameter | Description |
---|---|
ld | a parameter |
days | a parameter |
Parameter | Description |
---|---|
Exception | an exception |
public static LocalDateTime minusDaysAdjustedToStartOfDay(LocalDate ld, int days) throws Exception
//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(); } }