sheetjs_sheetjs/packages/ssf/bits/45_hijri.js
2022-03-09 06:28:19 -05:00

8 lines
204 B
JavaScript

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;
}