The tumblelog of
Scott Dowding.

I'm a software developer
in Edmonton, Alberta.

Questions? Email me

• Text Post

Comparing Dates in Objective-C

NSDate * dateOne = [NSDate date];
NSDate * dateTwo = [NSDate date];

if([dateOne compare:dateTwo] == NSOrderedAscending) {
    // dateOne is before dateTwo
}

(Source: myuiviews.com)

Comments

blog comments powered by Disqus

Stuff I Like

Following