{"id":15629808,"url":"https://github.com/code-hex/synchro","last_synced_at":"2025-05-16T18:05:51.297Z","repository":{"id":192353149,"uuid":"686566917","full_name":"Code-Hex/synchro","owner":"Code-Hex","description":"🕰️ Synchro: Timezone-typesafe date and time framework for Go. 🌟 Star to support our work!","archived":false,"fork":false,"pushed_at":"2024-12-31T09:14:03.000Z","size":410,"stargazers_count":266,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T18:14:06.264Z","etag":null,"topics":["calendar","date","datetime","go","golang","iso8601","time","timezone"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Code-Hex.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":"2023-09-03T08:14:38.000Z","updated_at":"2025-04-02T03:55:22.000Z","dependencies_parsed_at":"2023-11-11T09:21:20.969Z","dependency_job_id":"9c9d3ced-43d9-4282-85f1-36dfcdc09b40","html_url":"https://github.com/Code-Hex/synchro","commit_stats":{"total_commits":96,"total_committers":8,"mean_commits":12.0,"dds":"0.16666666666666663","last_synced_commit":"5109fce307226e8fa2a25b32acee26c6a0bed542"},"previous_names":["code-hex/synchro"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fsynchro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fsynchro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fsynchro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fsynchro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-Hex","download_url":"https://codeload.github.com/Code-Hex/synchro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248600785,"owners_count":21131548,"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","date","datetime","go","golang","iso8601","time","timezone"],"created_at":"2024-10-03T10:28:55.734Z","updated_at":"2025-04-12T16:46:20.312Z","avatar_url":"https://github.com/Code-Hex.png","language":"Go","readme":"# 🕰️ Synchro: Timezone-typesafe date and time framework for Go\n\n[![test](https://github.com/Code-Hex/synchro/actions/workflows/test.yml/badge.svg)](https://github.com/Code-Hex/synchro/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/Code-Hex/synchro/graph/badge.svg?token=VWPbmNRHw8)](https://codecov.io/gh/Code-Hex/synchro) [![Go Reference](https://pkg.go.dev/badge/github.com/Code-Hex/synchro/.svg)](https://pkg.go.dev/github.com/Code-Hex/synchro/)\n\nThis is inspired by Rust [chrono](https://github.com/chronotope/chrono)\n\n## Features\n\n- Timezone-typesafe date and time handling\n- Easy conversion between time zones\n- Support for common date and time operations\n- Compatible with the standard `time` package\n- Full compatible with [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) ([GoDoc](https://pkg.go.dev/github.com/Code-Hex/synchro/iso8601))\n  - ✅ Dates\n    - Years\n    - Calendar dates\n    - Week dates\n    - Quarter dates\n    - Ordinal dates\n  - ✅ Times\n  - ✅ Combined date and time representations\n  - ✅ Durations\n  - ✅ Time intervals\n    - Repeating intervals\n  - Note: This package can be used as civil time.\n    - Civil time is a time-zone-independent representation of time that follows the rules of the proleptic Gregorian calendar with exactly 24-hour days, 60-minute hours, and 60-second minutes.\n\n## Installation\n\nTo install Synchro, use `go get`:\n\n    go get github.com/Code-Hex/synchro\n\n## Synopsis\n\nTo use Synchro, import it in your Go code:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/Code-Hex/synchro\"\n    \"github.com/Code-Hex/synchro/tz\"\n)\n\nfunc main() {\n    // The current UTC time is fixed to `2023-09-02 14:00:00`.\n    utcNow := synchro.Now[tz.UTC]()\n    fmt.Println(utcNow)\n\n    jstNow := synchro.Now[tz.AsiaTokyo]()\n    fmt.Println(jstNow)\n    // Output:\n    // 2009-11-10 23:00:00 +0000 UTC\n    // 2009-11-11 08:00:00 +0900 JST\n}\n```\n\nhttps://go.dev/play/p/Ql3CM7NLfj0\n\nPlease refer to the numerous usage examples on [GoDoc](https://pkg.go.dev/github.com/Code-Hex/synchro/) for reference.\n\n## Utilities\n\nWe also have a wide range of very useful utilities!!\n\nIf you have a feature request, please open an issue. It would be great if you could provide relevant examples or links that could be helpful.\n\n- [In](https://pkg.go.dev/github.com/Code-Hex/synchro#In)\n- [ConvertTz](https://pkg.go.dev/github.com/Code-Hex/synchro#ConvertTz)\n- [NowContext](https://pkg.go.dev/github.com/Code-Hex/synchro#NowContext)\n- [Quarter](https://pkg.go.dev/github.com/Code-Hex/synchro#Quarter)\n- [Semester](https://pkg.go.dev/github.com/Code-Hex/synchro#Semester)\n- [StartOfMonth](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.StartOfMonth)\n- [EndOfMonth](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.EndOfMonth)\n- [StartOfQuarter](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.StartOfQuarter)\n- [EndOfQuarter](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.EndOfQuarter)\n- [StartOfSemester](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.StartOfSemester)\n- [EndOfSemester](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.EndOfSemester)\n- [StartOfWeek](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.StartOfWeek)\n- [EndOfWeek](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.EndOfWeek)\n- [StartOfYear](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.StartOfYear)\n- [EndOfYear](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.EndOfYear)\n- [IsBetween](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.IsBetween)\n- [IsLeapYear](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.IsLeapYear)\n- [DiffInCalendarDays](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.DiffInCalendarDays)\n- [Change](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.Change)\n  - `Change` allows you to specify the date and time components you want to change and make modifications.\n- [Advance](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.Advance)\n  - `Advance` allows you to specify the date and time components you want to increment and make modifications.\n- [Period](https://pkg.go.dev/github.com/Code-Hex/synchro#Period)\n- [Strptime](https://pkg.go.dev/github.com/Code-Hex/synchro#Strptime)\n- [Strftime](https://pkg.go.dev/github.com/Code-Hex/synchro#Time.Strftime)\n\n\n## TODO\n\n- [x] Support database/sql\n- [ ] Support i18n\n- [ ] Optimization\n\n## Contributing\n\nContributions to Synchro are welcome!\n\nTo contribute, please fork the repository and submit a pull request.\n\n\n## License\n\nSynchro is licensed under the MIT License. See LICENSE for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fsynchro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-hex%2Fsynchro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fsynchro/lists"}