I want to know the current day – and than do something special on this day
on monday = do this
on sunday = do that etc…
I know how to do the switch, but how can I ask to the current day?
if (...) {
do something;
}
else {
switch (..) {
case 0:
currentPageNumber = 2;
break;
case 1:
currentPageNumber = 3;
<...>
default:
break;
}
I think switch/case is the right way to do want I want. Thanks for helping me 😉
Gives you the current date in your timezone
Gives you an
NSDateComponentsinstance. You can get the weekday (value from 1-7/SU-SA) with