Here you can find the source of getDayOfWeekAsString(String sYear, String sMonth, String sDay)
public static String getDayOfWeekAsString(String sYear, String sMonth, String sDay)
//package com.java2s; /*/* w w w . jav a 2 s .c o m*/ * M2M ServiceFOTA ONM version 1.0 * * Copyright ? 2014 kt corp. All rights reserved. * * This is a proprietary software of kt corp, and you may not use this file except in * compliance with license agreement with kt corp. Any redistribution or use of this * software, with or without modification shall be strictly prohibited without prior written * approval of kt corp, and the copyright notice above does not evidence any actual or * intended publication of such software. */ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; public class Main { public static String getDayOfWeekAsString(String sYear, String sMonth, String sDay) { Calendar cd = new GregorianCalendar(Integer.parseInt(sYear), Integer.parseInt(sMonth) - 1, Integer.parseInt(sDay)); SimpleDateFormat sdf = new SimpleDateFormat("EEE", Locale.KOREA); // "EEE" - Day in Week Date d1 = cd.getTime(); return sdf.format(d1); } }