Java Month getFiscalMonth(int month, int fiscalMonthOffset)

Here you can find the source of getFiscalMonth(int month, int fiscalMonthOffset)

Description

get Fiscal Month

License

Open Source License

Parameter

Parameter Description
date a parameter
fiscalMonthOffset a parameter

Return

The fiscalMonth for the specified offset. In java Month starts at 0, so add 1 to the result to get actual month

Declaration

public static int getFiscalMonth(int month, int fiscalMonthOffset) 

Method Source Code

//package com.java2s;

public class Main {
    /**//w ww .jav  a2  s .c o  m
     * @param date
     * @param fiscalMonthOffset
     * @return The fiscalMonth for the specified offset. 
     * In java Month starts at 0, so add 1 to the result to get actual month
     */
    public static int getFiscalMonth(int month, int fiscalMonthOffset) {
        //           int month = date.get(Calendar.MONTH); 
        int result = ((month - fiscalMonthOffset - 1) % 12) + 1;
        if (result < 0) {
            result += 12;
        }
        return result;
    }
}

Related

  1. getCurrDateByMonth(String date)
  2. getEnligthMonth(String en)
  3. getEnMonth(String month)
  4. getFirstMonthByQuarter(int month)
  5. getFirstMonthOfQuarter(String quarter)
  6. getFrontMonth(String month)
  7. getMonthBegin(String strdate)
  8. getMonthBeginByMonth(String month)
  9. getMonthBetween(String strDate, int intDiff)