mirror of
https://github.com/quantum5/qcal.git
synced 2025-07-26 19:34:10 -04:00
common: implement jdnLordOfNight
This commit is contained in:
parent
d0ddad26c5
commit
fb576a4a5e
|
@ -113,3 +113,7 @@ export type LordOfNight = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|||
export function formatLordOfNight(lordOfNight: LordOfNight): string {
|
||||
return `G${lordOfNight}`;
|
||||
}
|
||||
|
||||
export function jdnLordOfNight(jdn: number): LordOfNight {
|
||||
return (jdn % 9 + 15) % 9 + 1 as LordOfNight;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue