Y
Y
yuki2020-10-17 07:56:07
Java
yuki, 2020-10-17 07:56:07

API level 21 get the day of the week?

Hello! There was a sharp need to know the current day of the week in the smartphone. How can this be done on android with api 21? Tried
Calendar cal = Calendar.getInstance();
But he, the dog, beats hands and says that the minimum api is needed 24 for such frauds. How else can I get the date?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HomeEdition, 2020-10-17
@rstJkee

I will assume that they imported the wrong class: they imported the android.icu.util.Calendar class instead of the java.util.Calendar class.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question