{"id":23838308,"url":"https://github.com/shred/commons-suncalc","last_synced_at":"2025-04-13T00:47:59.011Z","repository":{"id":55069431,"uuid":"57251795","full_name":"shred/commons-suncalc","owner":"shred","description":"Calculate sun and moon times in Java","archived":false,"fork":false,"pushed_at":"2025-02-08T15:22:34.000Z","size":563,"stargazers_count":136,"open_issues_count":1,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-13T00:47:42.862Z","etag":null,"topics":["android-library","java-library","mirrored-from-codeberg","moon-phase","sun-position"],"latest_commit_sha":null,"homepage":"https://codeberg.org/shred/commons-suncalc","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APL.txt","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":"2016-04-27T22:01:08.000Z","updated_at":"2025-03-25T11:08:39.000Z","dependencies_parsed_at":"2025-02-28T17:11:37.890Z","dependency_job_id":"b48fc25c-9397-48d7-b045-349f8d15bbf2","html_url":"https://github.com/shred/commons-suncalc","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shred%2Fcommons-suncalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shred%2Fcommons-suncalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shred%2Fcommons-suncalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shred%2Fcommons-suncalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shred","download_url":"https://codeload.github.com/shred/commons-suncalc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650437,"owners_count":21139672,"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":["android-library","java-library","mirrored-from-codeberg","moon-phase","sun-position"],"created_at":"2025-01-02T16:53:59.861Z","updated_at":"2025-04-13T00:47:58.991Z","avatar_url":"https://github.com/shred.png","language":"Java","readme":"# commons-suncalc ![build status](https://shredzone.org/badge/commons-suncalc.svg) ![maven central](https://shredzone.org/maven-central/org.shredzone.commons/commons-suncalc/badge.svg)\n\nA Java library for calculation of sun and moon positions and phases.\n\n## Features\n\n* Lightweight, only requires Java 8 or higher, no other dependencies\n* Android compatible, requires API level 26 (Android 8.0 \"Oreo\") or higher. For older Android versions, use [commons-suncalc v2](https://codeberg.org/shred/commons-suncalc/tree/v2), which is similar to this version, but does not use the Java Date/Time API.\n* Available at [Maven Central](http://search.maven.org/#search|ga|1|a%3A%22commons-suncalc%22)\n* Extensive unit tests\n\n## Accuracy\n\nAstronomical calculations are far more complex than throwing a few numbers into an obscure formula and then getting a fully accurate result. There is always a tradeoff between accuracy and computing time.\n\nThis library has its focus on getting _acceptable_ results at low cost, so it can also run on mobile devices, or devices with a low computing power. The results have an accuracy of about a minute, which should be good enough for common applications (like sunrise/sunset timers), but is probably not sufficient for astronomical purposes.\n\nIf you are looking for the highest possible accuracy, you are looking for a different library.\n\n## Quick Start\n\nThis library consists of a few models, all of them are invoked the same way:\n\n```java\nZonedDateTime dateTime = // date, time and timezone of calculation\ndouble lat, lng = // geolocation\nSunTimes times = SunTimes.compute()\n        .on(dateTime)   // set a date\n        .at(lat, lng)   // set a location\n        .execute();     // get the results\nSystem.out.println(\"Sunrise: \" + times.getRise());\nSystem.out.println(\"Sunset: \" + times.getSet());\n```\n\nRead the [online documentation](https://shredzone.org/maven/commons-suncalc/) for examples and API details.\n\nSee the [migration guide](https://shredzone.org/maven/commons-suncalc/migration.html) for how to migrate from a previous version.\n\n## References\n\nThis library bases on:\n\n* \"Astronomy on the Personal Computer\", 4th edition, by Oliver Montenbruck and Thomas Pfleger\n* \"Astronomical Algorithms\" by Jean Meeus\n\n## Contribute\n\n* Fork the [Source code at Codeberg](https://codeberg.org/shred/commons-suncalc). Feel free to send pull requests.\n* Found a bug? Please [file a bug report](https://codeberg.org/shred/commons-suncalc/issues).\n\n## License\n\n_commons-suncalc_ is open source software. The source code is distributed under the terms of [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshred%2Fcommons-suncalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshred%2Fcommons-suncalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshred%2Fcommons-suncalc/lists"}