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 ignor
When you NSDate.date()
in the playground, you see the default description printed. Use NSDateFormatter
to print a localized description of the date object, possibly with only the date portion.
To zero out specific portions of a date (for the sake of comparison), use NSDateComponents
in conjunction with NSCalendar
.