A typical Myanmar calendar usually describes astrological days such as auspicious days and ill fated days.
In this post, we will present about the following days and javascript code for them.
- Sabbath and Sabbath Eve
- Yatyaza
- Pyathada
- Thamanyo
- Amyeittasote
- Warameittugyi
- Warameittunge
- Yatpote
- Thamaphyu
- Yatyotema
- Mahayatkyan
- Shanyat
- Nagapor
- Nagahle
- Mahabote
- Nakhat
- Summary
The details about these days can be found at the following links.
Free Thinker
IT Mg Mg
Sabbath and Sabbath Eve
In the Myanmar calendar, full moon days, new moon days and waxing and waning 8 are sabbath days. The day before sabbath day is sabbath eve. Javascript code to check them is shown below.
//Sabbath and Sabbath eve
//input: ( md= day of month 0-30, mml= length of month)
//output: (sabbath [sabbath:1, else: 0], sabbatheve [sabbath eve:1, else: 0])
sabbath=0; if((md==8)||(md==15)||(md==23)||(md==mml)) sabbath=1;
sabbatheve=0;if((md==7)||(md==14)||(md==22)||(md==(mml-1))) sabbatheve=1;
Yatyaza
Yatyaza is auspicious day. Yatyaza depends on month and weekday as shown in the following table.
Yatyaza
Month |
Day |
Tagu, Wagaung, Nadaw | Wednesday, Friday |
Kason, Tawthalin, Pyatho | Thursday, Saturday |
Nayon, Thidingyut, Tabodwe | Tuesday, Thursday |
Waso, Tazaungmon, Tabaung | Sunday, Wednesday |
//Yatyaza
//input: (mm= month, wd= weekday [0:sat, 1:sun, ..., 6:fri])
//output: (yatyaza [yatyaza:1, else: 0])
yatyaza=0; m1=mm%4; wd1=Math.floor(m1/2)+4;
wd2=((1-Math.floor(m1/2))+m1%2)*(1+2*(m1%2));
if((wd==wd1)||(wd==wd2)) yatyaza=1;
Pyathada
Pyathada is ill-fated day. Pyathada depends on month and weekday as shown in the following table.
Pyathada
Month | Day |
Tagu, Wagaung, Nadaw | Thursday, Saturday |
Kason, Tawthalin, Pyatho | Wednesday, Friday |
Nayon, Thidingyut, Tabodwe | Sunday, Monday |
Waso, Tazaungmon, Tabaung | Tuesday, Wednesday Afternoon |
//Pyathada
//input: (mm= month, wd= weekday [0:sat, 1:sun, ..., 6:fri])
//output: (pyathada [pyathada:1, afternoon pyathada:2, else: 0])
m1=mm%4;
pyathada=0; wda=[1,3,3,0,2,1,2]; if(m1==wda[wd]) pyathada=1;
if((m1==0)&&(wd==4)) pyathada=2;
Thamanyo
Thamanyo is day of losing. Thamanyo depends on month and weekday as shown in the following table.
Thamanyo
Month | weekday |
Tagu | Saturday, Sunday |
Kason | Monday, Tuesday |
Nayon | Wednesday, Thursday |
Waso | Friday, Saturday |
Wagaung | Sunday, Monday |
Tawthalin | Tuesday, Wednesday |
Thidingyut | Thursday, Friday |
Tazaungmon | Saturday, Sunday |
Nadaw | Saturday, Sunday |
Pyatho | Sunday, Monday |
Tabodwe | Tuesday, Wednesday afternoon |
Tabaung | Thursday, Friday |
//Thamanyo
//input: (mm= month [1:Tagu, ... , 12:Tabaung], wd= weekday [0:sat, 1:sun, ... , 6:fri])
//output: (thamanyo [Thamanyo:1, else: 0])
thamanyo=0; m1=mm-1-Math.floor(mm/9); wd1=(m1*2-Math.floor(m1/8))%7;
wd2=(wd+7-wd1)%7; if(wd2<=1) thamanyo=1;
Amyeittasote
Amyeittasote is good and fulfilling day. Amyeittasote depends on waxing or waning day and weekday as shown in the following table.
Amyeittasote
waxing or waning day | weekday |
1 | Friday |
2 | Wednesday |
3 | Monday |
4 | Thursday |
5 | Saturday |
7 | Tuesday |
8 | Sunday |
//Amyeittasote
//input: (d=waxing or waning day, wd= weekday [0:sat, 1:sun, ..., 6:fri])
//output: (amyeittasote [Amyeittasote:1, else: 0])
amyeittasote=0; wda=[5,8,3,7,2,4,1]; if(d==wda[wd]) amyeittasote=1;
Warameittugyi
Warameittugyi is bad and hindered day. Warameittugyi depends on waxing or waning day and weekday as shown in the following table.
Warameittugyi
waxing or waning day | weekday |
7 | Saturday |
1 | Sunday |
4 | Monday |
8 | Tuesday |
9 | Wednesday |
6 | Thursday |
3 | Friday |
//Warameittugyi
//input: (d=waxing or waning day, wd= weekday [0:sat, 1:sun, ..., 6:fri])
//output: (warameittugyi [warameittugyi:1, else: 0])
warameittugyi=0; wda=[7,1,4,8,9,6,3]; if(d==wda[wd]) warameittugyi=1;
Warameittunge
Warameittunge is bad and hindered day. Warameittunge depends on waxing or waning day and weekday as shown in the following table.
Warameittunge
waxing or waning day | weekday |
6 | Saturday |
12 | Sunday |
11 | Monday |
10 | Tuesday |
9 | Wednesday |
8 | Thursday |
7 | Friday |
//Warameittunge
//input: (d=waxing or waning day, wd= weekday [0:sat, 1:sun, ..., 6:fri])
//output: (warameittunge [warameittunge:1, else: 0])
warameittunge=0; wn=(wd+6)%7; if((12-d)==wn) warameittunge=1;
Yatpote
Yatpote is withered and faded day. Yatpote depends on waxing or waning day and weekday as shown in the following table.
Yatpote
waxing or waning day | weekday |
8 | Saturday |
1 | Sunday |
4 | Monday |
6 | Tuesday |
9 | Wednesday |
8 | Thursday |
7 | Friday |
//Yatpote
//input: (d=waxing or waning day, wd= weekday [0:sat, 1:sun, ..., 6:fri])
//output: (yatpote [yatpote:1, else: 0])
yatpote=0; wda=[8,1,4,6,9,8,7]; if(d==wda[wd]) yatpote=1;
Thamaphyu
Thamaphyu is day of losing. Thamaphyu depends on waxing or waning day and weekday as shown in the following table.
Thamaphyu
waxing or waning day | weekday |
1 | Saturday, Sunday |
2 | Sunday |
3 | Thursday, Friday |
4 | Thursday |
5 | Wednesday |
6 | Monday, Tuesday, Thursday |
7 | Friday |
11 | Monday |
//Thamaphyu
//input: (d=waxing or waning day, wd= weekday [0:sat, 1:sun, ..., 6:fri])
//output: (thamaphyu [thamaphyu:1, else: 0])
thamaphyu=0; wda=[1,2,6,6,5,6,7]; if(d==wda[wd]) thamaphyu=1;
wda=[0,1,0,0,0,3,3]; if(d==wda[wd]) thamaphyu=1;
if((d==4) && (wd==5)) thamaphyu=1;
Nagapor
Nagapor is dissatisfying day. Nagapor depends on waxing or waning day and weekday as shown in the following table.
Nagapor
Weekday | Waxing moon day | Waning moon day |
Saturday | | 2, 11 |
Sunday | 2 | 4, 6 |
Monday | 1, 2, 4, 12 | 3 |
Tuesday | 10 | |
Wednesday | 9 | 3 |
Thursday | 2 | |
Friday | | 6 |
//Nagapor
//input: (md=day [0-30], wd= weekday [0:sat, 1:sun, ..., 6:fri])
//output: (nagapor [Nagapor:1, else: 0])
nagapor=0; wda=[26,21,2,10,18,2,21]; if(md==wda[wd]) nagapor=1;
wda=[17,19,1,0,9,0,0]; if(md==wda[wd]) nagapor=1;
if(((md==2) && (wd==1)) ||(((md==12)||(md==4)||(md==18)) && (wd==2)))nagapor=1;
Yatyotema
Yatyotema is withered and faded day. Yatyotema depends on month and waxing or waning day as shown in the following table.
Yatyotema
Month | waxing or waning day |
Tagu, Waso | 6 |
Kason, Tabodwe | 4 |
Nayon, Tawthalin | 8 |
Wagaung, Tazaungmon | 10 |
Thidingyut, Pyatho | 12 |
Nadaw, Tabaung | 2 |
//Yatyotema
//input: (mm= month [1:Tagu, ... , 12:Tabaung], d=waxing or waning day [1 - 15])
//output: (yatyotema [yatyotema:1, else: 0])
yatyotema=0; m1=(mm%2)?mm:((mm+9)%12); m1=(m1+4)%12+1; if(d==m1) yatyotema=1;
Mahayatkyan
It is said that Mahayatkyan should be avoided. Mahayatkyan depends on month and waxing or waning day as shown in the following table.
Mahayatkyan
Month | waxing or waning day |
Tagu | 5 |
Kason, Nayon | 6 |
Waso, Wagaung | 1 |
Tawthalin, Thidingyut | 2 |
Tazaungmon, Nadaw | 3 |
Pyatho, Tabodwe | 4 |
Tabaung | 5 |
//Mahayatkyan
//input: (mm= month [1:Tagu, ... , 12:Tabaung], d=waxing or waning day [1 - 15])
//output: (mahayatkyan [Mahayatkyan:1, else: 0])
mahayatkyan=0; m1=(Math.floor((mm%12)/2)+4)%6+1; if(d==m1) mahayatkyan=1;
Shanyat
It is said that Shanyat should be avoided. Shanyat depends on month and waxing or waning day as shown in the following table.
Shanyat
Month | waxing or waning day |
Tagu, Kason | 8 |
Nayon, Waso | 2 |
Wagaung | 9 |
Tawthalin, Thidingyut | 3 |
Tazaungmon | 5 |
Nadaw | 1 |
Pyatho, Tabaung | 4 |
Tabodwe | 7 |
//Shanyat
//input: (mm= month [1:Tagu, ... , 12:Tabaung], d=waxing or waning day [1 - 15])
//output: (shanyat [Shanyat:1, else: 0])
shanyat=0; sya=[8,8,2,2,9,3,3,5,1,4,7,4]; if(d==sya[mm-1]) shanyat=1;
Nagahle
The direction of the Milky Way galaxy is called Nagahle.
Nagahle
Month | Direction |
Tabaung, Tagu, Kason | West |
Nayon, Waso, Wagaung | North |
Tawthalin, Thidingyut, Tazaungmon | East |
Nadaw, Pyatho, Tabodwe | South |
//Nagahle
//input: (mm= month [1:Tagu, ... , 12:Tabaung])
//output: (nagahle [0: west, 1: north, 2: east, 3: south])
nagahle=Math.floor((mm%12)/3);
Mahabote
Mahabote has 7 types called Puti, Binga, Marana, Atun, Thike, Yaza, and Adipati
[မဟာဘုတ်-ဝီကီပီးဒီးယား].
//Mahabote
//input: (my= myanmar year, wd= weekday [0=sat, 1=sun, ..., 6=fri])
//output: (mahabote [0=Binga, 1=Atun, 2=Yaza, 3=Adipati, 4= Marana, 5=Thike, 6=Puti])
mahabote=(my-wd)%7;
Nakhat
Nakhat is obtained by dividing Myanmar year by 3 as follow.
//Mahabote
//input: (my= myanmar year)
//output: (nakhat [0=orc, 1=elf, 2=human])
nakhat=my%3;
Summary
The javascript code for calculating the above astrological days are summarized as shown in the following function.
//Checking Astrological days
//input: (mm=month, mml= length of the month,md= day of the month [0-30],
// wd= weekday [0=sat, 1=sun, ..., 6=fri], my=Myanmar year)
//output: (sabbath, sabbatheve,yatyaza,pyathada,thamanyo,amyeittasote,
// warameittugyi,warameittunge,yatpote,thamaphyu,nagapor,yatyotema,
// mahayatkyan,shanyat,nagahle [0=west, 1=north, 2=east, 3=south],
// mahabote [0=Binga, 1=Atun, 2=Yaza, 3=Adipati, 4= Marana, 5=Thike, 6=Puti]
// nakhat [0=orc, 1=elf, 2=human])
// More details @ http://cool-emerald.blogspot.sg/2013/12/myanmar-astrological-calendar-days.html
function astro(mm,mml,md,wd,my) {
var d,sabbath,sabbatheve,yatyaza,pyathada,thamanyo,amyeittasote;
var warameittugyi,warameittunge,yatpote,thamaphyu,nagapor,yatyotema;
var mahayatkyan,shanyat,nagahle,m1,wd1,wd2,wda,sya,mahabote;
if (mm<=0) mm=4;//first waso is considered waso
d=md-15*Math.floor(md/16);//waxing or waning day [0-15]
sabbath=0; if((md==8)||(md==15)||(md==23)||(md==mml)) sabbath=1;
sabbatheve=0;if((md==7)||(md==14)||(md==22)||(md==(mml-1))) sabbatheve=1;
yatyaza=0; m1=mm%4; wd1=Math.floor(m1/2)+4;
wd2=((1-Math.floor(m1/2))+m1%2)*(1+2*(m1%2));
if((wd==wd1)||(wd==wd2)) yatyaza=1;
pyathada=0; wda=[1,3,3,0,2,1,2]; if(m1==wda[wd]) pyathada=1;
if((m1==0)&&(wd==4)) pyathada=2;//afternoon pyathada
thamanyo=0; m1=mm-1-Math.floor(mm/9); wd1=(m1*2-Math.floor(m1/8))%7;
wd2=(wd+7-wd1)%7; if(wd2<=1) thamanyo=1;
amyeittasote=0; wda=[5,8,3,7,2,4,1]; if(d==wda[wd]) amyeittasote=1;
warameittugyi=0; wda=[7,1,4,8,9,6,3]; if(d==wda[wd]) warameittugyi=1;
warameittunge=0; wn=(wd+6)%7; if((12-d)==wn) warameittunge=1;
yatpote=0; wda=[8,1,4,6,9,8,7]; if(d==wda[wd]) yatpote=1;
thamaphyu=0; wda=[1,2,6,6,5,6,7]; if(d==wda[wd]) thamaphyu=1;
wda=[0,1,0,0,0,3,3]; if(d==wda[wd]) thamaphyu=1;
if((d==4) && (wd==5)) thamaphyu=1;
nagapor=0; wda=[26,21,2,10,18,2,21]; if(md==wda[wd]) nagapor=1;
wda=[17,19,1,0,9,0,0]; if(md==wda[wd]) nagapor=1;
if(((md==2)&&(wd==1))||(((md==12)||(md==4)||(md==18))&&(wd==2)))nagapor=1;
yatyotema=0; m1=(mm%2)?mm:((mm+9)%12); m1=(m1+4)%12+1; if(d==m1)yatyotema=1;
mahayatkyan=0; m1=(Math.floor((mm%12)/2)+4)%6+1; if(d==m1) mahayatkyan=1;
shanyat=0; sya=[8,8,2,2,9,3,3,5,1,4,7,4]; if(d==sya[mm-1]) shanyat=1;
nagahle=Math.floor((mm%12)/3);
mahabote=(my-wd)%7;
nakhat=my%3;
return {sabbath:sabbath,sabbatheve:sabbatheve,yatyaza:yatyaza,
pyathada:pyathada,thamanyo:thamanyo,amyeittasote:amyeittasote,
warameittugyi:warameittugyi,warameittunge:warameittunge,
yatpote:yatpote,thamaphyu:thamaphyu,nagapor:nagapor,
yatyotema:yatyotema,mahayatkyan:mahayatkyan,shanyat:shanyat,
nagahle:nagahle,mahabote:mahabote,nakhat:nakhat};
}
Related post:
Algorithm, Program and Calculation of Myanmar Calendar
No comments:
Post a Comment
Comments are moderated and don't be surprised if your comment does not appear promptly.