All Projects → onmyway133 → ISO8601

onmyway133 / ISO8601

Licence: other
🎗 Super lightweight ISO8601 Date Formatter in Swift

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ISO8601

Luatz
Time, Date and Timezone library for lua
Stars: ✭ 92 (+360%)
Mutual labels:  date, timezone
Date
A date and time library based on the C++11/14/17 <chrono> header
Stars: ✭ 2,389 (+11845%)
Mutual labels:  date, timezone
Date Fns Timezone
Parsing and formatting date strings using IANA time zones for date-fns.
Stars: ✭ 118 (+490%)
Mutual labels:  date, timezone
Swiftdate
🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
Stars: ✭ 6,661 (+33205%)
Mutual labels:  date, timezone
lit-date
Light-weight, faster datetime formatter for modern browsers.
Stars: ✭ 33 (+65%)
Mutual labels:  formatter, date
Timezone Support
Lightweight time zone support for your applications or other date libraries.
Stars: ✭ 90 (+350%)
Mutual labels:  date, timezone
Time
Building a better date/time library for Swift
Stars: ✭ 1,983 (+9815%)
Mutual labels:  date, timezone
TimesDates.jl
Nanosecond resolution for Time and Date, TimeZones
Stars: ✭ 28 (+40%)
Mutual labels:  date, timezone
intl-format
A wrapper library for PHP to format and internationalize values in messages like sprintf
Stars: ✭ 12 (-40%)
Mutual labels:  formatter, timezone
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (-5%)
Mutual labels:  formatter, date
Date Fns Tz
Complementary library for date-fns v2 adding IANA time zone support
Stars: ✭ 385 (+1825%)
Mutual labels:  date, timezone
Moment.php
Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Stars: ✭ 900 (+4400%)
Mutual labels:  formatter, date
nepali-datetime
Python's core datetime inspired nepali datetime (BS date & NPT) package 🇳🇵
Stars: ✭ 36 (+80%)
Mutual labels:  date, timezone
Js Joda
🕑 Immutable date and time library for javascript
Stars: ✭ 1,298 (+6390%)
Mutual labels:  date, timezone
hs-hourglass
efficient and simpler time API for haskell
Stars: ✭ 43 (+115%)
Mutual labels:  date, timezone
Delorean
Delorean: Time Travel Made Easy
Stars: ✭ 1,793 (+8865%)
Mutual labels:  date, timezone
temps-lite
A smart, good-looking little app which tries to speak your language the way you are used to.
Stars: ✭ 40 (+100%)
Mutual labels:  date, timezone
time machine
A date and time API for Dart
Stars: ✭ 120 (+500%)
Mutual labels:  date, timezone
format-date
📆 A small library (around 400 B when gziped & minified) to format JavaScript `Date` object using same tokens as moment.
Stars: ✭ 25 (+25%)
Mutual labels:  formatter, date
Translatedjs
Internationalization and localization for JavaScript and Node.js
Stars: ✭ 17 (-15%)
Mutual labels:  formatter, date

ISO8601

❤️ Support my apps ❤️

❤️❤️😇😍🤘❤️❤️

ISO8601 in Swift

Version Carthage Compatible License Platform

Description

My answer on How do I get ISO 8601 date in iOS?

Usage

Formatter

Create a new formatter

var config = Config()
config.timeZoneIdentifier = " +0000"
let formatter = Formatter(config: config)

or use the default

Formatter.shared

Convert string to date

Formatter.shared.date(string: "2016-04-08T10:25:30Z")		// extended format with Z
Formatter.shared.date(string: "20160408 10:25:30Z")			// basic format with Z
Formatter.shared.date(string: "2016-04-08 112530 +010000")	// extended format with timezone offset
Formatter.shared.date(string: "2016-04-08 202530GMT+1000")	// extended format with GMT
Formatter.shared.date(string: "2016-04-08T10:25:30.000Z")	// milliseconds

Convert date to string

let date = Date(timeIntervalSince1970: 1460111130)
Formatter.shared.string(date: date) // 2016-04-08T10:25:30Z	// timezone Z

Installation

ISO8601 is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ISO8601', git: 'https://github.com/onmyway133/ISO8601'

ISO8601 is also available through Carthage. To install just write into your Cartfile:

github "onmyway133/ISO8601"

Author

Khoa Pham, [email protected]

Contributing

We would love you to contribute to ISO8601, check the CONTRIBUTING file for more info.

License

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

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].