How to obtain the end of the day when given a LocalDate?

Here are a few alternatives, depending on what you need:

LocalDate.now().atTime(23, 59, 59);     //23:59:59
LocalDate.now().atTime(LocalTime.MAX);  //23:59:59.999999999

But there is no built-in method.

As commented by @JBNizet, if you want to create an interval, you can also use an interval up to midnight, exclusive.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)