$ diff orig/astro.js astro.js
0a1
> var astro = {};
101c102
< function jwday(j)
---
> astro.jwday = function jwday(j)
460c461
< JDE0tab1000 = new Array(
---
> var JDE0tab1000 = new Array(
467c468
< JDE0tab2000 = new Array(
---
> var JDE0tab2000 = new Array(
625a627,628
>
> module.exports = astro;
$
$
$ diff orig/calendar.js calendar.js
0a1,3
> var astro = require("astro");
>
> var cal = {};
528a532,536
> var ISLAMIC_MONTHS = new Array("Muharram", "Safar", "Rabi`al-Awwal",
>                                "Rabi`ath-Thani", "Jumada l-Ula",
>                                "Jumada t-Tania", "Rajab", "Sha`ban", "Ramadan",
>                                "Shawwal", "Dhu l-Qa`da", "Dhu l-Hijja");
>
924a933,954
> cal.gregorian_to_islamic = function gregorian_to_islamic(d)
> {
>     var j, year, mon, mday, hour, min, sec, weekday, islcal;
>
>     year = new Number(d.getFullYear());
>     mon = new Number(d.getMonth());
>     mday = new Number(d.getDate());
>     hour = new Number(d.getHours());
>     min = new Number(d.getMinutes());
>     sec = new Number(d.getSeconds());
>
>     j = gregorian_to_jd(year, mon + 1 , mday) +
>            (Math.floor(sec + 60 * (min + 60 * hour) + 0.5) / 86400.0);
>
>     weekday = astro.jwday(j);
>
>     islcal = jd_to_islamic(j);
>
>     return islcal[0] + " " + ISLAMIC_MONTHS[islcal[1]-1] + " " + islcal[2]
>                      + " yawm " + ISLAMIC_WEEKDAYS[weekday];
> }
>
1550a1581,1582
>
> module.exports = cal;
$