LocalDate

Period, Duration and Instant in Java

Period, Duration and Instant are three different classes introduced since Java 8 to help us deal better with time. Period measures the time with days granularity. In other words, there are no hours, minutes, nor seconds. Example: There are also methods ofDays, ofMonths and so on. It’s noteworthy to mention that you cannot convert automatically… read more »

Working with Time and Date in Java

Working with time and date in Java is essential to any project. There are three important classes you can use: java.time.LocalTime – working only with time. java.time.LocalDate – working only with date. java.time.LocalDateTime – working with time and date both. All three classes provide two essential methods: of(arguments) – accepting arguments for the time/date/datetime values…. read more »

Sidebar