get Week Day as String - Android java.util

Android examples for java.util:Week

Description

get Week Day as String

Demo Code


//package com.java2s;

import java.text.DateFormatSymbols;

import java.util.Calendar;

public class Main {
    public static String getWeekDay(Calendar calendar) {
        String[] weekdays = new DateFormatSymbols().getWeekdays();
        return weekdays[calendar.get(Calendar.DAY_OF_WEEK)];
    }//from  w  w  w . ja  va 2 s  .co m
}

Related Tutorials