Example usage for java.time DayOfWeek get

List of usage examples for java.time DayOfWeek get

Introduction

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

Prototype

@Override
public int get(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this day-of-week as an int .

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.get(ChronoField.DAY_OF_WEEK));
}