I´m wring an App which checks if today is for example if its at the moment sunday.
I have Date today = new Date();
and i want to know if it is a sunday
I´m wring an App which checks if today is for example if its at the moment sunday.
I have Date today = new Date();
and i want to know if it is a sunday
Date .getDay() is @deprecated so I suggest that you use Calendar
Calendar cal = Calendar.getInstance();
int day = cal.get(Calendar.DAY_OF_WEEK);
if(Calendar.SUNDAY == day) {
...
}