Here you can find the source of getWeekOfMonthFirstDay(Date dt)
@SuppressWarnings("deprecation") public static Integer getWeekOfMonthFirstDay(Date dt)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { @SuppressWarnings("deprecation") public static Integer getWeekOfMonthFirstDay(Date dt) { Calendar cal = Calendar.getInstance(); cal.set(dt.getYear() + 1900, dt.getMonth(), 1); return cal.get(Calendar.DAY_OF_WEEK) - 1; }/* ww w. j a v a 2 s . co m*/ }