Here you can find the source of getThisYearMonth()
static public int getThisYearMonth() throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.util.Calendar; public class Main { static public int getThisYearMonth() throws ParseException { //Date today = Calendar.getInstance().getTime(); Calendar today = Calendar.getInstance(); return (today.get(Calendar.YEAR)) * 100 + today.get(Calendar.MONTH) + 1; }/* w w w. j a v a 2 s . co m*/ }