Example usage for java.time DayOfWeek getLong

List of usage examples for java.time DayOfWeek getLong

Introduction

In this page you can find the example usage for java.time DayOfWeek getLong.

Prototype

@Override
public long getLong(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this day-of-week as a long .

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalDate localDate = LocalDate.of(2014, Month.JUNE, 21);
    DayOfWeek dayOfWeek = DayOfWeek.from(localDate);
    System.out.println(dayOfWeek.getLong(ChronoField.DAY_OF_WEEK));
}