iphone - if NSDate is Monday -
How can I check whether the NSDT is a specific day of the week, such as Monday, Tuesday, Wednesday and so on?
From memory (I do not currently have the work of the Objese environment):
int yourDOW = [[[NSCalendar current calendar] component: NSWeekdayCalendarUnitDate from: yourDate] day of the week;]; In other words: - Get the user current (if your (your dow == 2) {...} // sun = 1, sat = 7
calendar.
Comments
Post a Comment