Sha256: d359ee3ee7f2c42c429394830c12ab2375c4d47f513238bd751cf3f19f17cf14
Contents?: true
Size: 563 Bytes
Versions: 13
Compression:
Stored size: 563 Bytes
Contents
require "solareventcalculator" module Tlapse module SolarEvent LAT = 35.779590 LON = -78.638179 TZ = "America/New_York" def self.sunrise s = solar_event.compute_official_sunrise(TZ) n = Time.new Time.new(n.year, n.month, n.day, s.hour, s.minute) end def self.sunset s = solar_event.compute_official_sunset(TZ) n = Time.new Time.new(n.year, n.month, n.day, s.hour, s.minute) end def self.solar_event date = Date.new SolarEventCalculator.new date, LAT, LON end end end
Version data entries
13 entries across 13 versions & 1 rubygems