Here you can find the source of getFirstMonthByQuarter(int month)
public static int getFirstMonthByQuarter(int month)
//package com.java2s; //License from project: Apache License public class Main { public static int getFirstMonthByQuarter(int month) { int quarter = 0; if (month >= 1 && month <= 3) { quarter = 1;/* w w w .j ava2 s. c o m*/ } if (month >= 4 && month <= 6) { quarter = 4; } if (month >= 7 && month <= 9) { quarter = 7; } if (month >= 10 && month <= 12) { quarter = 10; } return quarter; } }