Here you can find the source of isSameMonth(String preMonth, String month)
public static boolean isSameMonth(String preMonth, String month)
//package com.java2s; //License from project: Apache License public class Main { public static boolean isSameMonth(String preMonth, String month) { return preMonth.substring(4, 6).equals(month.substring(4, 6)); }/*from w w w .j av a 2 s . c o m*/ }