Add or Subtract Hours, Minutes and Seconds in Java
Add or subtract hours, minutes and seconds in Java with LocalDateTime, ZonedDateTime, Instant and Duration, including DST changes and midnight rollover.
Add or subtract hours, minutes and seconds in Java with LocalDateTime, ZonedDateTime, Instant and Duration, including DST changes and midnight rollover.
Add business days in Java by skipping weekends and holidays with LocalDate, subtract them with the same method, and support Fri-Sat weekends.
Get the next and previous date in Java with plusDays(1) and minusDays(1), plus time zones, DST, the next Monday and the next working day with LocalDate.
Learn to add days to a date in Java with plusDays(), plusMonths() and plusYears(), with month-end rules, leap years, DST and java.util.Date conversion.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.