Example usage for java.time Month getLong

List of usage examples for java.time Month getLong

Introduction

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

Prototype

@Override
public long getLong(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this month-of-year as a long .

Usage

From source file:Main.java

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

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

}