Skip to content

Instantly share code, notes, and snippets.

@MikeTradr
Created December 21, 2016 04:33
Show Gist options
  • Save MikeTradr/515c5b2b5ea1dc1e299e61663ad67d1e to your computer and use it in GitHub Desktop.
Save MikeTradr/515c5b2b5ea1dc1e299e61663ad67d1e to your computer and use it in GitHub Desktop.
// add day word always for details view.
let dateFormatterDay = NSDateFormatter()
// get for day name as full word
dateFormatterDay.dateFormat = "EEEE"
let dayNameOfEvent = dateFormatterDay.stringFromDate(startDT)
if ( (day == "Today") || (day == "Tomorrow") ) {
day = day + ", " + dayNameOfEvent
} else {
day = dayNameOfEvent
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment