Java Calendar Day getDayName(Calendar cal)

Here you can find the source of getDayName(Calendar cal)

Description

get Day Name

License

Open Source License

Declaration

public static String getDayName(Calendar cal) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {
    static String[] dayName = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };

    public static String getDayName(Calendar cal) {

        String month = dayName[cal.get(Calendar.DAY_OF_WEEK) - 1];

        return month;
    }/*from  w  w w  .j  av  a2  s .  c  om*/
}

Related

  1. getCurDay(Calendar calendar)
  2. getDay(Calendar cal)
  3. getDay(Calendar calendar)
  4. getDay(Calendar calendar)
  5. getDayEndCalendar(Calendar cal)
  6. getDayOfPeriod(Calendar cal, long timems)
  7. getDaysFromThen(Calendar aDate)
  8. getDayStr(Calendar cal)
  9. getDayString(Calendar cal1)