Latest 1.1.0
Homepage https://github.com/SyncDB/DateParser
License MIT
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0, requires ARC
Frameworks Foundation
Authors

logo

Simple ISO 8601 and Unix timestamp Swift date parser.

Usage

// ISO 8601
let isoDate = try Date(dateString:"2015-06-23T14:40:08.000+02:00")

// Unix Timestamp
let timestampDate = try Date(unixTimestampString:"1441843200")

// Returns DateType.ISO8601  
let isoDateType = "2014-01-02T00:00:00.007450+00:00".dateType

// Returns DateType.UnixTimestamp
let timestampDateType = "1441843200000000".dateType

Supported Formats

2014-01-02
2016-01-09T00:00:00
2014-03-30T09:13:00Z
2016-01-09T00:00:00.00
2015-06-23T19:04:19.911Z
2014-01-01T00:00:00+00:00
2015-09-10T00:00:00.184968Z
2015-09-10T00:00:00.116+0000
2015-06-23T14:40:08.000+02:00
2014-01-02T00:00:00.000000+00:00

Installation

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

pod 'DateParser'

DateParser is also available through Carthage. To install
it, simply add the following line to your Cartfile:

github "SyncDB/DateParser"

License

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

Author

Elvis Nuñez, @3lvis

Latest podspec

{
    "name": "DateParser",
    "summary": "Simple ISO 8601 and Unix timestamp Swift date parser",
    "version": "1.1.0",
    "homepage": "https://github.com/SyncDB/DateParser",
    "license": "MIT",
    "authors": {
        "SyncDB": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SyncDB/DateParser.git",
        "tag": "1.1.0"
    },
    "social_media_url": "https://twitter.com/Sync_DB",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "requires_arc": true,
    "source_files": "Sources/**/*",
    "frameworks": "Foundation",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This