Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.3 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.3 KB

SunTimes

Build Status Coverage Status Hex.pm version Hex.pm downloads

Usage

In order to find the sunrise time in Amsterdam on the 14th of January:

lat = 52.3702
lon = 4.8952
day = Timex.to_date({2018 , 1, 14})

SunTimes.rise(day, lat, lon)

Similarly, in order to find the sunset time in Amsterdam on the same day:

lat = 52.3702
lon = 4.8952
day = Timex.to_date({2018 , 1, 14})

SunTimes.set(day, lat, lon)

Installation

If available in Hex, the package can be installed by adding sun_times to your list of dependencies in mix.exs:

def deps do
  [
    {:sun_times, "~> 0.1.2"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/sun_times.