{"id":29848532,"url":"https://github.com/karnott/grange","last_synced_at":"2025-07-29T19:25:04.054Z","repository":{"id":37091459,"uuid":"504489645","full_name":"Karnott/grange","owner":"Karnott","description":"Grange is a range library to manipulate date and number range in Golang","archived":false,"fork":false,"pushed_at":"2023-01-13T14:22:54.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-06-21T13:00:32.473Z","etag":null,"topics":["go","golang","range","ranges"],"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/Karnott.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-17T10:20:52.000Z","updated_at":"2024-06-21T13:00:32.474Z","dependencies_parsed_at":"2023-02-09T16:00:55.330Z","dependency_job_id":null,"html_url":"https://github.com/Karnott/grange","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Karnott/grange","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karnott%2Fgrange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karnott%2Fgrange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karnott%2Fgrange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karnott%2Fgrange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Karnott","download_url":"https://codeload.github.com/Karnott/grange/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karnott%2Fgrange/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267742256,"owners_count":24137379,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["go","golang","range","ranges"],"created_at":"2025-07-29T19:25:02.544Z","updated_at":"2025-07-29T19:25:04.016Z","avatar_url":"https://github.com/Karnott.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grange\n\nGrange is range library to manipulate date and number range\n\n# Install\n\n```bash\n# v1\ngo get github.com/karnott/grange\n\n# v2\ngo get github.com/karnott/grange/v2\n```\n\n# [V2] How to use it (check v1 package for correct struct name)\n\n```go\nimport github.com/karnott/grange\n\nfunc main() {\n  range1 := grange.NumberRange[int]{1, 10}\n  range2 := grange.NumberRange[int]{5, 20}\n\n  rangeIntersection := range.Intersection(range1, range2)\n  // rangeIntersection == [2]NumberRange[int]{5, 10}\n}\n```\n\n# Compatibility\n\nYou need to use Golang 1.18 or newer version\n\n# TODO\n\n- [x] range intersection\n- [ ] range union\n- [x] range difference\n- [ ] range contain\n- [ ] range before\n- [ ] range after\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarnott%2Fgrange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarnott%2Fgrange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarnott%2Fgrange/lists"}