TimeZoneLocate 0.4.0

TimeZoneLocate 0.4.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Dec 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Anthony Persaud.


Downloads

Total12,632
Week0
Month0

Installs

Apps201
Test Targets9
powered by Segment

GitHub

Stars7
Watchers5
Forks4
Issues0
Contributors3
Pull Requests0

Code

Files1
LOCLines of Code 64


TimeZoneLocate

This utility is the Swift 3.0 port of the APTimeZones library with the support for bundled frameworks. If your project is Objective-C, we recommend using theirs.

To continue using Swift 2.2 version, use version 0.1.0.

###Usage:

    //San Diego, CA, USA
    let location = CLLocation(latitude: 32.88, longitude: -117.15)

    //TimeZone from extension
    var timeZone = location.timeZone
    print(timeZone)

    //or calling the class method
    timeZone = TimeZoneLocate.timeZone(location: location)
    print(timeZone)

    //if you have the country code, you can speed things up.
    timeZone = TimeZoneLocate.timeZone(location: location, countryCode: "US")

Requirements

Installation

To install it, simply add the following line to your Podfile:

pod "TimeZoneLocate"

Authors

  • Original Objective-C Version: Sergii Kryvoblotskyi, Alterplay
  • Swift Contributor: Anthony Persaud, [email protected]

License

TimeZoneLocate is available under the MIT license. See the LICENSE file for more info.