Example usage for java.time Month get

List of usage examples for java.time Month get

Introduction

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

Prototype

@Override
public int get(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this month-of-year as an int .

Usage

From source file:Main.java

public static void main(String[] args) {
    Month m = Month.from(LocalDate.now());

    System.out.println(m.get(ChronoField.MONTH_OF_YEAR));

}