mourner / suncalc

A tiny JavaScript library for calculating sun/moon positions and phases.
BSD 2-Clause "Simplified" License
3.1k stars 417 forks source link

Add Timezone offset argument #27

Closed acamarata closed 10 years ago

acamarata commented 10 years ago

After date, lat and lng we should add an offset argument from GMT to display the calculations in the correct time to the location being calculated for. If we leave this as a simple argument requiring "5" or "-5" and so on then the user can get this using the Node.js package tzwhere or use an API from Google, Geonames or other sources.

mourner commented 10 years ago

I don't think this is needed as a part of suncalc. It accepts a Date object and returns Date objects (not strings) in results, which all can be formatted depending on timezone requirements in the application logic.