/solarex

Elixir package for calculating moon phase, sunrise and sunset for particular date and place on the Earth.

Primary LanguageElixirMIT LicenseMIT

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:

def deps do
  [
    {:solarex, "~> 0.1.1"}
  ]
end

Modules

Moon

Solarex.Moon module is for calculating moon phase using naive approach by calculating the days from the known new moon.

You can specify known new moon using config.exs

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. 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.

License

This software is licensed under the MIT license.