How can I check if an NSDate is a specific day of the week, like a Monday, Tuesday, Wednesday, and so on?
From memory (I don't have an ObjC environment handy at the moment):
int yourDOW = [[[NSCalendar currentCalendar] components:NSWeekdayCalendarUnit
fromDate:yourDate] weekday];
if (yourDOW == 2) { ... } // Sun = 1, Sat = 7
In other words:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With