Here you can find the source of GetWeekDay()
public static String GetWeekDay()
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static String GetWeekDay() { Calendar c = Calendar.getInstance(); int dayOfWeek = c.get(Calendar.DAY_OF_WEEK); switch (dayOfWeek) { case 2:/*from w ww .j av a2s . co m*/ return "monday"; case 3: return "tuesday"; case 4: return "wednesday"; case 5: return "thursday"; case 6: return "friday"; case 7: return "saturday"; case 1: return "sunday"; } return "all"; } }