Java Day of formatShortNameOfDay(final Date date)

Here you can find the source of formatShortNameOfDay(final Date date)

Description

format Short Name Of Day

License

Open Source License

Return

Short name of day represented by the giving day. The context user's locale and time zone is considered.

Declaration

public static final String formatShortNameOfDay(final Date date) 

Method Source Code

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

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.Locale;
import java.util.TimeZone;

public class Main {
    /**//from  ww w  .j a  v  a 2s .  co m
     * @return Short name of day represented by the giving day. The context
     *         user's locale and time zone is considered.
     */
    public static final String formatShortNameOfDay(final Date date) {
        final DateFormat df = new SimpleDateFormat("EE", Locale.getDefault());
        df.setTimeZone(TimeZone.getDefault());
        return df.format(date);
    }
}

Related

  1. countDay(String begin, String end)
  2. endOfTheDay(Date date)
  3. formatDate(String day)
  4. formatDay(final Date time)
  5. formatDayTime(String day)
  6. get1DayBeforDate()
  7. get8BitTime(Date date, int deltaDay)
  8. getAfterDays(String date, String pattern, int afterDays)
  9. getAge(Date birthDay)