if I have two nsdatecomponent and I want a know if the TIME in the first object is bigger than the second.
example:
if (nsdatecomponentObject1 > nsdatecomponentObject2)
{
//something
}
Because this way don't works, how I can do this?
Use compare:
on the NSDate
of the NSDateComponent
.
if([[nsdatecomponentObject1 date] compare:[nsdatecomponentObject2 date]] == NSOrderedAscending)
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