sheetjs/packages/ssf/bits/45_hijri.js

8 lines
204 B
JavaScript
Raw Normal View History

function fix_hijri(date/*:Date*/, o/*:[number, number, number]*/) {
/* TODO: properly adjust y/m/d and */
o[0] -= 581;
var dow = date.getDay();
if(date < 60) dow = (dow + 6) % 7;
return dow;
}