Java Date Time - LocalDate ofEpochDay(long epochDay) example








LocalDate ofEpochDay(long epochDay) creates an instance of LocalDate from the epoch day count.

Syntax

ofEpochDay has the following syntax.

public static LocalDate ofEpochDay(long epochDay)

Example

The following example shows how to use ofEpochDay.

import java.time.LocalDate;

public class Main {
  public static void main(String[] args) {
    LocalDate a = LocalDate.ofEpochDay(1000);
    
    System.out.println(a);
  }
}

The code above generates the following result.