{"id":13412442,"url":"https://github.com/1set/cronrange","last_synced_at":"2025-03-14T18:31:32.324Z","repository":{"id":36010615,"uuid":"220726282","full_name":"1set/cronrange","owner":"1set","description":"time range expression in cron style","archived":false,"fork":false,"pushed_at":"2022-09-04T16:47:05.000Z","size":54,"stargazers_count":18,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:50:55.872Z","etag":null,"topics":["cron","cron-definitions","cron-expression","cron-parser","cron-style","duration","go-package","range","range-expression","time-zone"],"latest_commit_sha":null,"homepage":null,"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/1set.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}},"created_at":"2019-11-10T01:30:45.000Z","updated_at":"2022-09-26T09:52:51.000Z","dependencies_parsed_at":"2022-08-08T12:46:10.963Z","dependency_job_id":null,"html_url":"https://github.com/1set/cronrange","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1set%2Fcronrange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1set%2Fcronrange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1set%2Fcronrange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1set%2Fcronrange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1set","download_url":"https://codeload.github.com/1set/cronrange/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221495297,"owners_count":16832455,"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":["cron","cron-definitions","cron-expression","cron-parser","cron-style","duration","go-package","range","range-expression","time-zone"],"created_at":"2024-07-30T20:01:24.716Z","updated_at":"2024-10-26T04:30:37.177Z","avatar_url":"https://github.com/1set.png","language":"Go","readme":"# cronrange\n\n[![GoDoc](https://godoc.org/github.com/1set/cronrange?status.svg)](https://godoc.org/github.com/1set/cronrange)\n[![License](https://img.shields.io/github/license/1set/cronrange)](https://github.com/1set/cronrange/blob/master/LICENSE)\n[![GitHub Action Workflow](https://github.com/1set/cronrange/workflows/build/badge.svg)](https://github.com/1set/cronrange/actions?workflow=build)\n[![Go Report Card](https://goreportcard.com/badge/github.com/1set/cronrange)](https://goreportcard.com/report/github.com/1set/cronrange)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ef272059b4044252b0097270b48d5703)](https://www.codacy.com/manual/an9an63/cronrange)\n[![Codecov](https://codecov.io/gh/1set/cronrange/branch/master/graph/badge.svg)](https://codecov.io/gh/1set/cronrange)\n\ncronrange is a Go package for _time range expression_ in _Cron_ style.\n\nIn a nutshell, CronRange expression is a combination of Cron expression and time duration to represent periodic time ranges, i.e. **Cron** for Time**Range**. And it made easier to tell if the moment falls within the any time ranges (use [IsWithin()](https://godoc.org/github.com/1set/cronrange#CronRange.IsWithin) method), and what's the next occurrence (use [NextOccurrences()](https://godoc.org/github.com/1set/cronrange#CronRange.NextOccurrences) method).\n\nFor example, every New Year's Day in Tokyo can be written as:\n\n```cron\nDR=1440; TZ=Asia/Tokyo; 0 0 1 1 *\n```\n\nIt consists of three parts separated by a semicolon:\n\n-   `DR=1440` stands for duration in minutes, 60 \\* 24 = 1440 min;\n-   `TZ=Asia/Tokyo` is optional and for time zone using name in [IANA Time Zone database](https://www.iana.org/time-zones);\n-   `0 0 1 1 *` is a cron expression representing the beginning of the time range.\n\n## Installation\n\nTo download the package:\n\n```bash\ngo get -u github.com/1set/cronrange\n```\n\n## Usage\n\nTo import it in your program as:\n\n```go\nimport \"github.com/1set/cronrange\"\n```\n\nExamples can be found in [GoDoc](https://godoc.org/github.com/1set/cronrange#pkg-examples).\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2F1set%2Fcronrange.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2F1set%2Fcronrange?ref=badge_large)\n","funding_links":[],"categories":["Date and Time","日期和时间","日期和时间`用于处理日期和时间的库`","Relational Databases"],"sub_categories":["Search and Analytic Databases","检索及分析资料库","SQL 查询语句构建库","Advanced Console UIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1set%2Fcronrange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1set%2Fcronrange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1set%2Fcronrange/lists"}