-
-
Save Epictetus/4bebea23aaa8f639e94b7eec1356b43e to your computer and use it in GitHub Desktop.
Ruby Code to calculate sunrise and sunset times where I live
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'solareventcalculator' | |
solar = SolarEventCalculator.new(Date.today, BigDecimal.new('51.563'), BigDecimal.new('-0.499')) | |
puts "Sunrise: #{solar.compute_utc_civil_sunrise.getlocal}" | |
puts "Sunset: #{solar.compute_utc_civil_sunset.getlocal}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment