Skip to content

Instantly share code, notes, and snippets.

@malcommac
Created September 24, 2016 14:26
Show Gist options
  • Select an option

  • Save malcommac/f9d01a0ff0d69a6a517e0843cff1a606 to your computer and use it in GitHub Desktop.

Select an option

Save malcommac/f9d01a0ff0d69a6a517e0843cff1a606 to your computer and use it in GitHub Desktop.
New DateInRegion from absolute date
// Create a Region in Rome TimeZone with Gregorian Calendar and Italy locale settings
let regionRome = Region(tz: TimeZoneName.europeRome, cal: CalendarName.gregorian, loc: LocaleName.italianItaly)
// Resulting object is DateInRegion which express the current moment in Rome
let dateInRome = DateInRegion(absoluteDate: Date(), in: regionRome)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment