Here you can find the source of currentMonth()
public static String currentMonth()
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private final static SimpleDateFormat yyyyMM = new SimpleDateFormat("yyyyMM"); public static String currentMonth() { return yyyyMM.format(new Date()); }//from ww w . ja v a 2s.co m }