Swiftpack.co - Package - BinaryBirds/TimeZones

TimeZones (🕐)

Strong typed, autocompleted time zones with locations for Swift.

Usage

Some examples:

import TimeZones

let gmt = TimeZone(abbrevation: .gmt)

let budapest = TimeZone.Europe.Budapest
budapest.identifier //"Europe/Budapest"
budapest.latitude // 47.497_912
budapest.longitude // 19.040_235
budapest.timeZone // TimeZone object

Install

Just use the Swift Package Manager as usual:

.package(url: "https://github.com/binarybirds/timezones", from: "1.0.0"),

⚠️ Don't forget to add "TimeZones" to your target as a dependency!

License

WTFPL - Do what the fuck you want to.

Github

link
Stars: 1
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

1.0.1 - Feb 14, 2019

  • refactored structs to enums with some POP magic 💫

1.0.0 - Feb 8, 2019

  • create time zone from abbrevation enum
  • get strongly typed time zone with location info