webdial

Incomplete JS port of moondial.
git clone https://code.literati.org/webdial.git
Log | Files | Refs

commit f7f078c303209a257e9160a0db63be64190edfb1
parent 698c91600ea20550aadb954ac230d2a00d669d6f
Author: Sean Lynch <seanl@literati.org>
Date:   Thu,  8 Sep 2011 00:01:20 -0700

Use correct Date methods.

Diffstat:
Msun.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sun.js b/sun.js @@ -111,9 +111,9 @@ function Sun() { this.cal_to_jd = function(date) { var yr = date.getUTCFullYear(); var mo = date.getUTCMonth() + 1; // WTF??? - var day = date.getUTCDate() + date.getUTCHour() / 12.0 - + date.getUTCMinute() / 1440.0 - + date.getUTCSecond() / 86400.0; + var day = date.getUTCDate() + date.getUTCHours() / 12.0 + + date.getUTCMinutes() / 1440.0 + + date.getUTCSeconds() / 86400.0; if (mo <= 2) { yr -= 1; mo += 12;