Example usage for java.time Month firstMonthOfQuarter

List of usage examples for java.time Month firstMonthOfQuarter

Introduction

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

Prototype

public Month firstMonthOfQuarter() 

Source Link

Document

Gets the month corresponding to the first month of this quarter.

Usage

From source file:Main.java

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

    System.out.println(m.firstMonthOfQuarter());

}

From source file:Main.java

public static void main(String[] args) {
    LocalDate date = LocalDate.of(2014, 2, 15); // 2014-02-15
    Month february = date.getMonth();
    System.out.println(february); // FEBRUARY

    int februaryIntValue = february.getValue();
    System.out.println(februaryIntValue); // 2

    // 28 , 29// ww  w  . ja  v a 2  s. c o m
    System.out.println(String.format("%s , %s", february.minLength(), february.maxLength()));

    Month firstMonthOfQuarter = february.firstMonthOfQuarter();
    System.out.println(firstMonthOfQuarter); // JANUARY
}