{"id":1063,"url":"https://github.com/davedelong/time","last_synced_at":"2025-10-18T04:38:19.143Z","repository":{"id":38424378,"uuid":"108942468","full_name":"davedelong/time","owner":"davedelong","description":"Robust and type-safe date and time calculations for Swift","archived":false,"fork":false,"pushed_at":"2024-10-26T22:43:52.000Z","size":3805,"stargazers_count":2337,"open_issues_count":13,"forks_count":77,"subscribers_count":48,"default_branch":"main","last_synced_at":"2025-05-13T09:08:55.061Z","etag":null,"topics":["calendar","calendar-api","calendars","date","date-formatting","date-time","dates","datetime","swift","swift-library","time","timezone"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davedelong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-31T03:51:23.000Z","updated_at":"2025-04-30T09:23:53.000Z","dependencies_parsed_at":"2024-04-27T20:40:25.597Z","dependency_job_id":"cd4d0545-b21f-40b3-add0-ddce443ab071","html_url":"https://github.com/davedelong/time","commit_stats":{"total_commits":313,"total_committers":19,"mean_commits":"16.473684210526315","dds":0.1309904153354633,"last_synced_commit":"b652fe17d13dca2ed5f3aa0209b309de4a10821d"},"previous_names":["davedelong/chronology"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davedelong%2Ftime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davedelong%2Ftime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davedelong%2Ftime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davedelong%2Ftime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davedelong","download_url":"https://codeload.github.com/davedelong/time/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076850,"owners_count":22010611,"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":["calendar","calendar-api","calendars","date","date-formatting","date-time","dates","datetime","swift","swift-library","time","timezone"],"created_at":"2024-01-05T20:15:38.121Z","updated_at":"2025-10-18T04:38:14.115Z","avatar_url":"https://github.com/davedelong.png","language":"Swift","readme":"# Time\n\n**Time** is a Swift package that makes it easy to perform robust and type-safe date and time calculations.\n\nWorking with calendars can be extremely complicated and error-prone. **Time** solves these problems by clarifying concepts and restricting improper usage through type-safe APIs.\n\n## Installing\n\n**Time** can be installed like any other Swift package. Add this to the `dependencies` section of your Package.swift:\n\n```swift\n.package(url: \"https://github.com/davedelong/time\", from: \"1.0.0\")\n```\n\n## Platform Support\n\n**Time** requires Swift 5.7 or later, as well as macOS 13/iOS 16 (or equivalent) or later. Core parts of the library are built on Swift's `Duration` type, which was introduced in macOS 13/iOS 16.\n\n## Documentation\n\n**Time**'s extensive documentation is hosted at the [Swift Package Index][spi].\n\nAdditionally, an \"Examples\" folder in this repository contains code illustrating how to use core parts of the library.\n\n## The Basics\n\nHere's the TL;DR of the documentation:\n\n- If you want to know what time it is, you need the device's `RegionalClock`, which you get by using `Clocks.system`.\n\n- A `RegionalClock` tells you the current time. For example, `.today` will give you the current calendar day. `.currentMinute` will give you the current time, accurate down to the _minute_ level.\n\n- Each of these returned values has methods to retrieve more- and less- precise values. For example, `today.hours` will give you a sequence of all the \"Hour\" values in the day.\n\n- These values can be _formatted_ into human-readable strings via their `.format(...)` methods.\n\nFor additional information, refer to [the documentation][spi] and included examples.\n\n## Contributing\n\n**Time** is fully open source, available at [https://github.com/davedelong/time][gh]. If you have feature requests, suggestions, or have discovered a bug, please open a [new issue][ghi].\n\n[spi]: https://swiftpackageindex.com/davedelong/time\n[gh]: https://github.com/davedelong/time\n[ghi]: https://github.com/davedelong/time/issues\n\n## License\n\n**Time** is licensed under the MIT License. For more information, see the [LICENSE](https://github.com/davedelong/time/blob/main/LICENSE) file.\n\n","funding_links":[],"categories":["Date \u0026 Time","Libs","Swift","Date [🔝](#readme)"],"sub_categories":["Getting Started","Date"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavedelong%2Ftime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavedelong%2Ftime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavedelong%2Ftime/lists"}