LocalDate ofEpochDay(long epochDay) example

Description

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;
/*  www .ja v a2  s .com*/
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.





















Home »
  Java Date Time »
    java.time Reference »




Clock
DayOfWeek
Duration
Instant
LocalDate
LocalDateTime
LocalTime
Month
MonthDay
OffsetDateTime
OffsetTime
Period
Year
YearMonth
ZonedDateTime
ZoneId
ZoneOffset