{"id":16813846,"url":"https://github.com/bmhatfield/sunset","last_synced_at":"2025-03-17T11:42:58.977Z","repository":{"id":144292350,"uuid":"111942404","full_name":"bmhatfield/sunset","owner":"bmhatfield","description":"Retrieve crepscular timings from sunrise-sunset.org","archived":false,"fork":false,"pushed_at":"2018-07-04T15:53:01.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T21:29:35.106Z","etag":null,"topics":["go","golang","sunrise","sunrise-sunset","sunset"],"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/bmhatfield.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-11-24T17:33:00.000Z","updated_at":"2021-12-05T15:23:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3e2afab-d6c9-4c4b-a8f1-829ab9b6182e","html_url":"https://github.com/bmhatfield/sunset","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/bmhatfield%2Fsunset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmhatfield%2Fsunset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmhatfield%2Fsunset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmhatfield%2Fsunset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmhatfield","download_url":"https://codeload.github.com/bmhatfield/sunset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244029610,"owners_count":20386448,"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":["go","golang","sunrise","sunrise-sunset","sunset"],"created_at":"2024-10-13T10:28:01.315Z","updated_at":"2025-03-17T11:42:58.972Z","avatar_url":"https://github.com/bmhatfield.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sunset\n\nRetrieve crepscular timings from sunrise-sunset.org\n\n[![Godoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)]( https://godoc.org/github.com/bmhatfield/sunset/sunset)\n\n## Design\n\nThis package is designed to be able to automatically retrieve Sunset timings based upon your current GeoIP. Each type and method is separately exported, so you can insert your own logic anywhere in the chain. For an example of how the chain ties together, see `sunset/sunset.go`\n\nFor an explanation of the different times returned, please see [MrReid.org's explanations](http://wordpress.mrreid.org/2013/02/05/dawn-dusk-sunrise-sunset-and-twilight/)\n\n## APIs\n\n`freegeoip.go`: GeoIP infromation from [freegeoip.net](https://freegeoip.net/). Works around IPv6 limitations.\n\n`ipify.go`: Your current IPv4 from [ipify.org](https://api.ipify.org?format=json). Used to work around FreeGeoIP's IPv6 issues.\n\n`sunrise-sunset.go`: Sunrise timings from [sunrise-sunset.org](https://api.sunrise-sunset.org/json?lat=36.7201600\u0026lng=-4.4203400\u0026formatted=0). Times are in UTC and must be converted with `.Local()`.\n\n## Use\n\nGo Get: `go get -u github.com/bmhatfield/sunset`\n\nCLI: `go run print-sunset.go`\n\nAPI: `sunset.Time()`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmhatfield%2Fsunset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmhatfield%2Fsunset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmhatfield%2Fsunset/lists"}