Java Month issueMonthNum(int issue1, int issue2)

Here you can find the source of issueMonthNum(int issue1, int issue2)

Description

issue Month Num

License

Open Source License

Declaration

public static int issueMonthNum(int issue1, int issue2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static int issueMonthNum(int issue1, int issue2) {
        int k = issue1;
        issue1 = k >= issue2 ? k : issue2;
        issue2 = k < issue2 ? k : issue2;
        int yearnum = issue1 / 100 - issue2 / 100;
        int monthnum = issue1 % 100 - issue2 % 100;
        if (monthnum < 0)
            return 12 * (yearnum - 1) + (12 + monthnum);
        else if (monthnum > 0)
            return 12 * yearnum + monthnum;
        else/*  www . j a v a2s  . c  o m*/
            return 12 * yearnum;
    }
}

Related

  1. isMonthInRange(int month)
  2. isNumMonth(int m)
  3. isQuarterMonth(String[] types)
  4. isSameMonth(String preMonth, String month)
  5. issueMonth(int issue1, int issue2)
  6. isValidMonth(int month)
  7. isValidObjectModelMonth(int aMonth)
  8. isWeekOfMonth(int num)
  9. leapMonth(int y)