Comparing NSDates without time component
问题 In a swift playground, I have been using NSDate.date() But, this always appears with the time element appended. For my app I need to ignore the time element. Is this possible in Swift? How can it be done? Even if I could set the time element to be the same time on every date that would work too. Also, I am trying to compare two dates and at the moment I am using the following code: var earlierDate:NSDate = firstDate.earlierDate(secondDate) Is this the only way or can I do this in a way that