Posts From Category: java8

Java8 Date Time API

The main improvements over previous classes are Thread safety and ease of use.

LocalDate

Represents a date in ISO format (yyyy-MM-dd) without time.

// Declaration
final LocalDate ld1 = LocalDate.now();
final LocalDate ld2 = LocalDate.of(2015, 02, 20);
final LocalDate ld3 = LocalDate.parse("2015-02-20");

Read More