Here you can find the source of ceilDate(LocalDateTime dateTime)
Parameter | Description |
---|---|
dateTime | LocalDateTime for operation to be performed on. |
public static LocalDateTime ceilDate(LocalDateTime dateTime)
//package com.java2s; //License from project: Open Source License import java.time.LocalDateTime; public class Main { /**/* ww w .j a va 2s . c o m*/ * Performs a "ceiling" operation on a LocalDateTime, and returns a new LocalDateTime * with time set to 23:59. * * @param dateTime LocalDateTime for operation to be performed on. * @return "Ceiled" LocalDateTime. */ public static LocalDateTime ceilDate(LocalDateTime dateTime) { if (dateTime == null) { return null; } return dateTime.toLocalDate().atTime(23, 59); } }