{"id":19342170,"url":"https://github.com/dontlaugh/lilrange","last_synced_at":"2025-07-04T10:03:10.531Z","repository":{"id":119284116,"uuid":"196864355","full_name":"dontlaugh/lilrange","owner":"dontlaugh","description":"DSL for UTC time ranges, e.g. parse \"0400-0800\" as a Duration","archived":false,"fork":false,"pushed_at":"2019-07-15T12:43:34.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T13:04:24.967Z","etag":null,"topics":["dsl","duration-parsing","time-range","utc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dontlaugh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-07-14T17:21:10.000Z","updated_at":"2022-01-01T05:00:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3f541f8-a6aa-4a33-8f24-c9caeb86efa5","html_url":"https://github.com/dontlaugh/lilrange","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/dontlaugh%2Flilrange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontlaugh%2Flilrange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontlaugh%2Flilrange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontlaugh%2Flilrange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dontlaugh","download_url":"https://codeload.github.com/dontlaugh/lilrange/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240449772,"owners_count":19803122,"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":["dsl","duration-parsing","time-range","utc"],"created_at":"2024-11-10T03:33:56.045Z","updated_at":"2025-02-24T08:43:23.959Z","avatar_url":"https://github.com/dontlaugh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lilrange\n\nAn opinionated string DSL for creating UTC time ranges.\n\n## Usage\n\nGet a `lilrange.Range` from a string.\n\n```go\nrange, err := lilrange.Parse(\"0000-0400\")\n```\n\nThe returned range's `End` time is guaranteed to be in the future. The `Start`\ntime could be in the past, or the future.\n\nTo determine if your current system time is inside the range, pass a `time.Time`\nto the `Within` method. \n\n```go\n// get a lilrange.Range\nr, _ := lilrange.Parse(\"0130-0230\")\n\n// get the current time with Go's time package\nnow := time.Now()\n\n// Are we within the Range?\nif r.Within(now) {\n    fmt.Println(\"We are inside the range\")\n}\n```\n\n## Test Program\n\nA test program can be compiled from the *lilrange* sub directory, or use `go get -u`\nif `$GOPATH/bin` is on your PATH.\n\n```\ngo get -u github.com/dontlaugh/lilrange/lilrange\n```\n\nGive it a lilrange string to test the behavior.\n\n```\nlilrange 0415-0445\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdontlaugh%2Flilrange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdontlaugh%2Flilrange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdontlaugh%2Flilrange/lists"}