Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binarybirds/timezones
Strong typed, autocompleted time zones with locations for Swift.
https://github.com/binarybirds/timezones
linux location swift timezone xcode
Last synced: about 2 months ago
JSON representation
Strong typed, autocompleted time zones with locations for Swift.
- Host: GitHub
- URL: https://github.com/binarybirds/timezones
- Owner: BinaryBirds
- License: mit
- Created: 2019-02-08T11:50:43.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-02-17T15:18:47.000Z (almost 3 years ago)
- Last Synced: 2024-11-17T17:38:57.971Z (2 months ago)
- Topics: linux, location, swift, timezone, xcode
- Language: Swift
- Homepage:
- Size: 29.3 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TimeZones (🕐)
Strong typed, autocompleted time zones with locations for Swift.
## Usage
Some examples:
```swift
import TimeZoneslet 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](https://theswiftdev.com/2017/11/09/swift-package-manager-tutorial/) as usual:
```swift
.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](LICENSE) - Do what the fuck you want to.