get Day Of Week Three Chars - Android java.util

Android examples for java.util:Week

Description

get Day Of Week Three Chars

Demo Code


//package com.java2s;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import java.util.Date;
import java.util.Locale;

public class Main {
    private static final DateFormat EEE_DAY_OF_WEEK_FORMAT = new SimpleDateFormat(
            "EEE", Locale.getDefault());

    public static String getDayOfWeekThreeChars(Date date, Locale locale) {
        return EEE_DAY_OF_WEEK_FORMAT.format(date).toUpperCase(locale);
    }/*from   w w  w. j a  v a  2 s .  com*/
}

Related Tutorials