mm-cal-js
Version:
Myanmar calendar calculation library
54 lines (53 loc) • 1.9 kB
TypeScript
/**
* Julian day number to Myanmar date
* @param julianDay : julian day number
* @returns myanmarYearType = year type [0=common, 1=little watat, 2=big watat]
* @returns month = [
* Tagu=1, Kason=2, Nayon=3, 1st Waso=0, 2nd Waso=4,
* Wagaung=5, Tawthalin=6, Thadingyut=7, Tazaungmon=8,
* Nadaw=9, Pyatho=10, Tabodwe=11, Tabaung=12,
* Late Tagu=13, Late Kason=14]
* @returns monthType = [0=Hnaung, 1=Oo]
* @returns monthLength = [29 or 30 days]
* @returns monthDay = [1 to 30]
* @returns fortnightDay = [1 to 15]
* @returns moonPhase = [0=waxing, 1=full moon, 2=waning, 3=new moon]
* @returns weekDay = [0=sat, 1=sun, 2=mon, 3=tue, 4=wed, 5=thu, 6=fri]
*/
export declare const julianToMyanmarDate: (julianDay: number) => {
myanmarYear: number;
myanmarYearType: number;
yearLength: number;
month: number;
monthType: number;
monthLength: number;
monthDay: number;
weekDay: number;
julianDay: number;
};
/**
* Check watat (intercalary month) (chk_watat)
* @param myanmarYear Myanmar year
* @returns watat = intercalary month [1=watat, 0=common]
* @returns fm = full moon day of 2nd Waso in jdn_mm (jdn+6.5 for MMT) [only valid when watat=1]
*/
export declare const checkWatat: (myanmarYear: number) => {
fullMoon: number;
watat: number;
};
/**
* Check Myanamr year (chk_my)
* depenency: chk_watat(my)
* @param myanmarYear Myanmar year
* @returns map
* myanmarYearType = year type [0=common, 1=little watat, 2=big watat] (myt)
* tagu1 = the 1st day of Tagu as Julian Day Number (Julian Day Number for MMT) tg1
* fullMoon = full moon day of [2nd] Waso as Julian Day Number (fm)
* watatError = [0=ok, 1=error] (werr)
*/
export declare const checkMyanmarYear: (myanmarYear: number) => {
myanmarYearType: number;
tagu1: number;
fullMoon: number;
watatError: number;
};