{"id":13610971,"url":"https://github.com/kelvins/sunrisesunset","last_synced_at":"2025-04-13T01:33:49.930Z","repository":{"id":54399543,"uuid":"86012576","full_name":"kelvins/sunrisesunset","owner":"kelvins","description":" :sunrise: Go package that provides the sunrise and sunset equation","archived":true,"fork":false,"pushed_at":"2023-04-19T16:57:32.000Z","size":27,"stargazers_count":76,"open_issues_count":4,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-30T23:43:22.607Z","etag":null,"topics":["go","golang","sunrise","sunrise-equation","sunset"],"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/kelvins.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}},"created_at":"2017-03-24T01:04:23.000Z","updated_at":"2024-03-07T23:04:47.000Z","dependencies_parsed_at":"2024-01-19T10:14:09.730Z","dependency_job_id":"6e0d625e-3f29-4791-a2a8-5986c8751042","html_url":"https://github.com/kelvins/sunrisesunset","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fsunrisesunset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fsunrisesunset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fsunrisesunset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fsunrisesunset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelvins","download_url":"https://codeload.github.com/kelvins/sunrisesunset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558446,"owners_count":17165133,"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-equation","sunset"],"created_at":"2024-08-01T19:01:50.108Z","updated_at":"2024-11-07T17:31:01.341Z","avatar_url":"https://github.com/kelvins.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003e :warning: This project is no longer being maintained :warning:\n\u003e\n\u003e Consider using a forked version of this repository or another project like [go-sunrise](https://github.com/nathan-osman/go-sunrise).\n\nSunrise Sunset Package\n==========================\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE)\n[![Build Status](https://travis-ci.org/kelvins/sunrisesunset.svg?branch=master)](https://travis-ci.org/kelvins/sunrisesunset)\n[![Coverage Status](https://coveralls.io/repos/github/kelvins/sunrisesunset/badge.svg?branch=master)](https://coveralls.io/github/kelvins/sunrisesunset?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kelvins/sunrisesunset)](https://goreportcard.com/report/github.com/kelvins/sunrisesunset)\n\nGo package used to calculate the apparent sunrise and sunset times based on latitude, longitude, date and UTC offset.\n\nYou can use go get command:\n\n    go get github.com/kelvins/sunrisesunset\n\n![](http://i.imgur.com/hjUZT28.jpg)\n\nGeneral\n----\n\nThis package was created based on the [Corrected Sunrise, Sunset, Noon Times in Seconds - and Solar Angles][1] Matlab function developed by Richard Droste, that was created based on the [spreadsheets][2] available in the [Earth System Research Laboratory][3] website from the [National Oceanic \u0026 Atmospheric Administration (NOAA)][4].\n\nBased on the [Solar Calculation Details][5]:\n\n\u003e The calculations in the NOAA Sunrise/Sunset and Solar Position Calculators are based on equations from Astronomical Algorithms, by Jean Meeus. The sunrise and sunset results are theoretically accurate to within a minute for locations between +/- 72° latitude, and within 10 minutes outside of those latitudes. However, due to variations in atmospheric composition, temperature, pressure and conditions, observed values may vary from calculations.\n\n[Apparent Sunrise/Sunset][6]:\n\n\u003e Due to atmospheric refraction, sunrise occurs shortly before the sun crosses above the horizon. Light from the sun is bent, or refracted, as it enters earth's atmosphere. See [Apparent Sunrise Figure][7]. This effect causes the apparent sunrise to be earlier than the actual sunrise. Similarly, apparent sunset occurs slightly later than actual sunset. The sunrise and sunset times reported in our calculator have been corrected for the approximate effects of atmospheric refraction. However, it should be noted that due to changes in air pressure, relative humidity, and other quantities, we cannot predict the exact effects of atmospheric refraction on sunrise and sunset time. Also note that this possible error increases with higher (closer to the poles) latitudes.\n\nUsage\n----\n\n``` go\n\npackage main\n\nimport (\n    \"fmt\"\n    \"time\"\n    \"github.com/kelvins/sunrisesunset\"\n)\n\nfunc main() {\n    // You can use the Parameters structure to set the parameters\n    p := sunrisesunset.Parameters{\n      Latitude:  -23.545570,\n      Longitude: -46.704082,\n      UtcOffset: -3.0,\n      Date:      time.Date(2017, 3, 23, 0, 0, 0, 0, time.UTC),\n    }\n\n    // Calculate the sunrise and sunset times\n    sunrise, sunset, err := p.GetSunriseSunset()\n\n    // If no error has occurred, print the results\n    if err == nil {\n        fmt.Println(\"Sunrise:\", sunrise.Format(\"15:04:05\")) // Sunrise: 06:11:44\n        fmt.Println(\"Sunset:\", sunset.Format(\"15:04:05\")) // Sunset: 18:14:27\n    } else {\n        fmt.Println(err)\n    }\n}\n\n```\n\nLicense\n----\n\nThis project was created under the [MIT license][8]\n\n\n  [1]: https://www.mathworks.com/matlabcentral/fileexchange/62180-corrected-sunrise--sunset--noon-times-in-seconds-and-solar-angles?requestedDomain=www.mathworks.com\n  [2]: https://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html\n  [3]: https://www.esrl.noaa.gov/\n  [4]: http://www.noaa.gov/\n  [5]: https://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html\n  [6]: https://www.esrl.noaa.gov/gmd/grad/solcalc/glossary.html#A\n  [7]: https://www.esrl.noaa.gov/gmd/grad/solcalc/apparent_sunrise.gif\n  [8]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvins%2Fsunrisesunset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelvins%2Fsunrisesunset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvins%2Fsunrisesunset/lists"}