What is the easiest way to get the current day of the week in Android?

前端 未结 11 1528
南方客
南方客 2020-11-27 02:44

What would be the easiest way to get the current day of the week in Android?

11条回答
  •  攒了一身酷
    2020-11-27 03:17

    Calendar.getInstance().get(Calendar.DAY_OF_WEEK)
    

    or

    new GregorianCalendar().get(Calendar.DAY_OF_WEEK);
    

    Just the same as in Java, nothing particular to Android.

提交回复
热议问题