Skip to content

Instantly share code, notes, and snippets.

@michaelevensen
Last active October 28, 2016 12:27
Show Gist options
  • Save michaelevensen/a2771d6f54048dc5eaeec211191bc42d to your computer and use it in GitHub Desktop.
Save michaelevensen/a2771d6f54048dc5eaeec211191bc42d to your computer and use it in GitHub Desktop.
Simple way of formatting a date.
// Date format
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "dd. MMMM"
// Output current date in format
dateFormatter.string(from: Date())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment