{"id":2027,"url":"https://github.com/onmyway133/iso8601","last_synced_at":"2025-05-13T02:10:27.136Z","repository":{"id":69038495,"uuid":"58239099","full_name":"onmyway133/ISO8601","owner":"onmyway133","description":"🎗 Super lightweight ISO8601 Date Formatter in Swift","archived":false,"fork":false,"pushed_at":"2020-05-12T21:32:02.000Z","size":222,"stargazers_count":20,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T05:51:15.332Z","etag":null,"topics":["8601","date","formatter","ios","iso","timezone"],"latest_commit_sha":null,"homepage":"https://onmyway133.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onmyway133.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-06T22:57:15.000Z","updated_at":"2024-12-08T19:55:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"2a248563-b87e-4d51-a1f9-4fd7470089ff","html_url":"https://github.com/onmyway133/ISO8601","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2FISO8601","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2FISO8601/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2FISO8601/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2FISO8601/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onmyway133","download_url":"https://codeload.github.com/onmyway133/ISO8601/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856656,"owners_count":21974582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["8601","date","formatter","ios","iso","timezone"],"created_at":"2024-01-05T20:16:01.589Z","updated_at":"2025-05-13T02:10:27.118Z","avatar_url":"https://github.com/onmyway133.png","language":"Swift","funding_links":[],"categories":["UI","Text"],"sub_categories":["Layout","Other free courses","Other Testing","Keychain"],"readme":"# ISO8601\n\n❤️ Support my apps ❤️ \n\n- [Push Hero - pure Swift native macOS application to test push notifications](https://onmyway133.com/pushhero)\n- [PastePal - Pasteboard, note and shortcut manager](https://onmyway133.com/pastepal)\n- [Quick Check - smart todo manager](https://onmyway133.com/quickcheck)\n- [Alias - App and file shortcut manager](https://onmyway133.com/alias)\n- [My other apps](https://onmyway133.com/apps/)\n\n❤️❤️😇😍🤘❤️❤️\n\nISO8601 in Swift\n\n[![Version](https://img.shields.io/cocoapods/v/ISO8601.svg?style=flat)](http://cocoadocs.org/docsets/ISO8601)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](https://img.shields.io/cocoapods/l/ISO8601.svg?style=flat)](http://cocoadocs.org/docsets/ISO8601)\n[![Platform](https://img.shields.io/cocoapods/p/ISO8601.svg?style=flat)](http://cocoadocs.org/docsets/ISO8601)\n\u003cimg src=\"https://img.shields.io/badge/%20in-swift%204.0-orange.svg\"\u003e\n\n![](Screenshots/Banner.png)\n\n## Description\n\nMy answer on [How do I get ISO 8601 date in iOS?](http://stackoverflow.com/a/37082414/1418457)\n\n## Usage\n\n### Formatter\n\nCreate a new formatter\n\n```swift\nvar config = Config()\nconfig.timeZoneIdentifier = \" +0000\"\nlet formatter = Formatter(config: config)\n```\n\nor use the default\n\n```swift\nFormatter.shared\n```\n\n### Convert string to date\n\n```swift\nFormatter.shared.date(string: \"2016-04-08T10:25:30Z\")\t\t// extended format with Z\nFormatter.shared.date(string: \"20160408 10:25:30Z\")\t\t\t// basic format with Z\nFormatter.shared.date(string: \"2016-04-08 112530 +010000\")\t// extended format with timezone offset\nFormatter.shared.date(string: \"2016-04-08 202530GMT+1000\")\t// extended format with GMT\nFormatter.shared.date(string: \"2016-04-08T10:25:30.000Z\")\t// milliseconds\n```\n\n### Convert date to string\n\n```swift\nlet date = Date(timeIntervalSince1970: 1460111130)\nFormatter.shared.string(date: date) // 2016-04-08T10:25:30Z\t// timezone Z\n```\n\n## Installation\n\n**ISO8601** is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'ISO8601', git: 'https://github.com/onmyway133/ISO8601'\n```\n\n**ISO8601** is also available through [Carthage](https://github.com/Carthage/Carthage).\nTo install just write into your Cartfile:\n\n```ruby\ngithub \"onmyway133/ISO8601\"\n```\n\n## Author\n\nKhoa Pham, onmyway133@gmail.com\n\n## Contributing\n\nWe would love you to contribute to **ISO8601**, check the [CONTRIBUTING](https://github.com/onmyway133/ISO8601/blob/master/CONTRIBUTING.md) file for more info.\n\n## License\n\n**ISO8601** is available under the MIT license. See the [LICENSE](https://github.com/onmyway133/ISO8601/blob/master/LICENSE.md) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmyway133%2Fiso8601","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonmyway133%2Fiso8601","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmyway133%2Fiso8601/lists"}