Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; public class Main { public static Date friday() { return weekDay(Calendar.FRIDAY); } private static Date weekDay(int week) { Calendar cal = calendar(); cal.set(Calendar.DAY_OF_WEEK, week); return cal.getTime(); } public static Calendar calendar() { Calendar cal = GregorianCalendar.getInstance(Locale.CHINESE); cal.setFirstDayOfWeek(Calendar.MONDAY); return cal; } }