Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.markdown

sun_calc

Build Status

A Ruby library, translated from the SunCalc JavaScript library, for calculating sun positions, sunlight phases, moon positions, and lunar phase for a given time and location.

Installing

gem install sun_calc

Using

require 'sun_calc'
SunCalc.sun_position(Time.now, 59.3345, 18.0662)
#=> {:azimuth=>0.5724083892517442, :altitude=>0.6713233729313038}

The library shares a similar API as the JavaScript library.

JavaScript Ruby
getPosition sun_position
getTimes sun_times
addTime add_sun_time
getMoonPosition moon_position
getMoonTimes moon_times

Maintainer

About

Library for calculating sun/moon positions and phases

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.