Here you can find the source of issueMonthNum(int issue1, int issue2)
public static int issueMonthNum(int issue1, int issue2)
//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; } }