datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

Get Day of the week (ie. Sunday/Monday)

Open kkl260 opened this issue 10 years ago • 0 comments

I've tried as much as I could to simply get the Name of the day of the week (Sunday/Monday) but nothing is working for me. I'm either not getting the correct day, or after choosing the date and opening the dialog again and choosing a different date, it's not updating the day.

Is there something specific with this library that I can do to get the day? This is what I've been doing so far:

public void onDateSet(DatePickerDialog datePickerDialog, int year, int month, int day) {

    SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
    Date d = new Date();
    String dayOfTheWeek = sdf.format(d);

    dateBtn.setText(dayOfTheWeek);

}

kkl260 avatar Feb 16 '15 22:02 kkl260