Here you can find the source of getFirstMonthOfThisYear()
public static String getFirstMonthOfThisYear()
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { private static int curYear; private static String date; public static String getFirstMonthOfThisYear() { Calendar calendar = Calendar.getInstance(); curYear = calendar.get(Calendar.YEAR); date = "" + curYear + "01"; // System.out.println(date); return date; }//from w ww. j ava 2 s.co m }