Java Week Day getDayOfWeekAbreviated(Date d)

Here you can find the source of getDayOfWeekAbreviated(Date d)

Description

get Day Of Week Abreviated

License

Open Source License

Declaration

public static String getDayOfWeekAbreviated(Date d) 

Method Source Code

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

import java.util.*;

public class Main {
    public static String getDayOfWeekAbreviated(Date d) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(d);/*from w  ww  .j  av  a  2 s. c o m*/
        int ret = cal.get(Calendar.DAY_OF_WEEK);
        if (ret == Calendar.MONDAY)
            return "Seg";
        if (ret == Calendar.TUESDAY)
            return "Ter";
        if (ret == Calendar.WEDNESDAY)
            return "Qua";
        if (ret == Calendar.THURSDAY)
            return "Qui";
        if (ret == Calendar.FRIDAY)
            return "Sex";
        if (ret == Calendar.SATURDAY)
            return "Sab";
        if (ret == Calendar.SUNDAY)
            return "Dom";
        return "";
    }
}

Related

  1. GetDayOfWeek(long p)
  2. getDayOfWeek(String dat)
  3. getDayOfWeek(String date)
  4. getDayOfWeek(String year, String month, String day)
  5. getDayOfWeekAbbreviation(int day)
  6. getDayOfWeekShortString(Date date)
  7. getDaysExceptWeekend(String from, String to)
  8. getDayWithWeek(Date date)
  9. getENWeekDay()