https://github.com/vhyza/solarex
Elixir package for calculating moon phase, sunrise and sunset for particular date and place on the Earth.
https://github.com/vhyza/solarex
elixir moon-phase sunrise sunrise-sunset sunset
Last synced: 12 days ago
JSON representation
Elixir package for calculating moon phase, sunrise and sunset for particular date and place on the Earth.
- Host: GitHub
- URL: https://github.com/vhyza/solarex
- Owner: vhyza
- License: mit
- Created: 2019-04-04T16:26:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-11T15:18:40.000Z (about 6 years ago)
- Last Synced: 2025-04-22T19:11:32.469Z (about 1 month ago)
- Topics: elixir, moon-phase, sunrise, sunrise-sunset, sunset
- Language: Elixir
- Homepage:
- Size: 17.6 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# About
With Solarex Elixir package, you can calculate moon phase, sunrise and sunset for particular date and place on the Earth.
## Installation
The package can be installed by adding `solarex` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:solarex, "~> 0.1.1"}
]
end
```## Modules
### Moon
`Solarex.Moon` module is for calculating [moon phase](https://en.wikipedia.org/wiki/Lunar_phase#Calculating_phase) using naive approach by calculating the days from the known new moon.
You can specify known new moon using `config.exs`
```elixir
use Mix.Config# Set the date to known new moon
#
config :solarex, known_new_moon: "2019-01-06"
```### Sun
`Solarex.Sun` is Elixir implementation of Mike Bostock's [Solar Calculator](https://github.com/mbostock/solar-calculator). It can be used for calculating sunrise and sunset for particular date and place on earth (specified by latitude and longitude)
## Documentation
Generated documentation can be found at [Hexdocs](https://hexdocs.pm/solarex).
## License
This software is licensed under the [MIT license](LICENSE.md).