Java tutorial
//package com.java2s; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static long getMonthTimeMilis(long l) { return getMonthTimeMilis(l, (new Date(l)).getMonth()); } public static long getMonthTimeMilis(long l, int i) { Date date = new Date(l); GregorianCalendar gregoriancalendar = new GregorianCalendar(); gregoriancalendar.set(date.getYear() + 1900, i, 1, 0, 0, 0); gregoriancalendar.set(14, 0); return gregoriancalendar.getTimeInMillis(); } }