All Projects → gligorkot → Timezonepicker

gligorkot / Timezonepicker

Licence: apache-2.0
A TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your most suitable time zone.

Programming Languages

swift
15916 projects
swift3
66 projects

Labels

Projects that are alternatives of or similar to Timezonepicker

Googleapi
C# .NET Core Google Api (Maps, Places, Roads, Search, Translate). Supports all endpoints and requests / responses.
Stars: ✭ 346 (+217.43%)
Mutual labels:  timezone
Windows Iana
A small tool to convert Windows time zones to IANA
Stars: ✭ 17 (-84.4%)
Mutual labels:  timezone
Posix tz db
Generates POSIX timezones strings
Stars: ✭ 57 (-47.71%)
Mutual labels:  timezone
Date Fns Tz
Complementary library for date-fns v2 adding IANA time zone support
Stars: ✭ 385 (+253.21%)
Mutual labels:  timezone
Geolocator
A utility for getting geo-location information via HTML5 and IP look-ups, geocoding, address look-ups, distance and durations, timezone information and more...
Stars: ✭ 598 (+448.62%)
Mutual labels:  timezone
Time Zone Proposal
A proposal for accurately computing local time in JavaScript
Stars: ✭ 25 (-77.06%)
Mutual labels:  timezone
Time4j
Advanced date, time and interval library for Java with sun/moon-astronomy and calendars like Chinese, Coptic, Ethiopian, French Republican, Hebrew, Hijri, Historic Christian, Indian National, Japanese, Julian, Korean, Minguo, Persian, Thai, Vietnamese
Stars: ✭ 328 (+200.92%)
Mutual labels:  timezone
Js Joda
🕑 Immutable date and time library for javascript
Stars: ✭ 1,298 (+1090.83%)
Mutual labels:  timezone
Swiftdate
🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
Stars: ✭ 6,661 (+6011.01%)
Mutual labels:  timezone
Google Time Zone
Get time zones for coordinates
Stars: ✭ 54 (-50.46%)
Mutual labels:  timezone
Dateutils
nifty command line date and time utilities; fast date calculations and conversion in the shell
Stars: ✭ 458 (+320.18%)
Mutual labels:  timezone
Valheim Docker
Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.
Stars: ✭ 525 (+381.65%)
Mutual labels:  timezone
Event Bot
📣 Discord Bot to make announcements about upcoming sessions for the Fellows using Google Calendar and Calendly
Stars: ✭ 21 (-80.73%)
Mutual labels:  timezone
Zonebie
Zonebie prevents bugs in code that deals with timezones by randomly assigning a zone on every run
Stars: ✭ 382 (+250.46%)
Mutual labels:  timezone
Time
A simplified approach to working with dates, times, and time zones.
Stars: ✭ 83 (-23.85%)
Mutual labels:  timezone
Spacetime
A lightweight javascript timezone library
Stars: ✭ 3,463 (+3077.06%)
Mutual labels:  timezone
Paper Timezone
Polymer based timezone selection component
Stars: ✭ 19 (-82.57%)
Mutual labels:  timezone
Luatz
Time, Date and Timezone library for lua
Stars: ✭ 92 (-15.6%)
Mutual labels:  timezone
Timezone Support
Lightweight time zone support for your applications or other date libraries.
Stars: ✭ 90 (-17.43%)
Mutual labels:  timezone
Tz offset
Simple abstraction of a timezone offset
Stars: ✭ 35 (-67.89%)
Mutual labels:  timezone

TimeZonePicker

Build Status codebeat badge Version License Platform

Buy Me a Coffee at ko-fi.com

A TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your most suitable time zone.

Screenshots

Installation

CocoaPods

To install it in your iOS project, install with CocoaPods

pod 'TimeZonePicker'

Usage

Basic Initialisation

To initialise a timeZonePicker you can use the class function getVC(withDelegate: TimeZonePickerDelegate) on the TimeZonePickerViewController as below:

let timeZonePicker = TimeZonePickerViewController.getVC(withDelegate: self)

Then you can use the timeZonePicker as you would any UIViewController, for example:

present(timeZonePicker, animated: true, completion: nil)

TimeZonePickerDelegate

The TimeZonePickerDelegate currently has only one method that needs to be implemented:

func timeZonePicker(_ timeZonePicker: TimeZonePickerViewController, didSelectTimeZone timeZone: TimeZone)

Once an item is selected from the table of cities/countries the above delegate method gets called, conveniently returning the TimeZonePickerViewController and the selected TimeZone. You can use the timeZonePicker to dismiss it here and the timeZone as you need it in your application. For example:

func timeZonePicker(_ timeZonePicker: TimeZonePickerViewController, didSelectTimeZone timeZone: TimeZone) {
    timeZoneName.text = timeZone.identifier
    timeZoneOffset.text = timeZone.abbreviation()
    timeZonePicker.dismiss(animated: true, completion: nil)
}

Please check the TimeZonePickerExample project for the above usage example. If you have any questions do not hesitate to get in touch with me.

Requirements

  • iOS 8 or later.
  • Swift 3

License

Copyright (c) 2017 Gligor Kotushevski

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].