Home > front end >  I spent a week's time, the use of the ASP code to obtain the Gregorian calendar into the lunar
I spent a week's time, the use of the ASP code to obtain the Gregorian calendar into the lunar

Time:02-27

Circulating on the Internet the ASP code to convert Gregorian calendar to the lunar calendar is from 1921 to 2020 at the end of the year is over, 2021 web pages appear error code, I spent a week's time to rewrite the code, from the end of 2100, 2021 contributions for everyone to use!

<%
MonthAdd dim WeekName (7), (11), NongliData (79), TianGan (9), DiZhi (11), ShuXiang (11), DayName (30), MonName (12)
Dim curTime curYear, curMonth curDay, curWeekday
Dim GongliStr WeekdayStr, NongliStr, NongliDayStr
Dim I, m, n, k, isEnd, bit, TheDate

'week name
WeekName (0)='*'
WeekName (1)="Sunday"
WeekName (2)="Monday"
WeekName (3)="Tuesday"
WeekName (4)="Wednesday"
WeekName (5)="Thursday"
WeekName (6)="Friday"
WeekName (7)="Saturday"

'the air-dried name
TianGan (0)="a"
TianGan (1)="b"
TianGan (2)="c"
TianGan (3)="ding"
TianGan (4)="e"
TianGan (5)="f"
TianGan (6)="g"
TianGan (7)="xin"
TianGan (8)="nonyl"
TianGan (9)="decyl"

'earthly branch name
DiZhi (0)="sub"
DiZhi (1)="ugly"
DiZhi (2)="Yin"
DiZhi (3)="sockets"
DiZhi (4)="Chen"
DiZhi (5)="third"
DiZhi (6)="noon"
DiZhi (7)="not"
DiZhi (8)="" "
DiZhi (9)="unitary"
DiZhi (10)="xu-gou ("
DiZhi (11)="hai"

'the name of the animal sign
ShuXiang (0)="rat"
ShuXiang (1)="cow"
ShuXiang (2)="tiger"
ShuXiang (3)="rabbit"
ShuXiang (4)="dragon"
ShuXiang (5)="snake"
ShuXiang (6)="horse"
ShuXiang (7)="sheep"
ShuXiang (8)="monkey"
ShuXiang (9)="chicken"
ShuXiang (10)="dog"
ShuXiang (11)="pig"

'lunar date name
DayName (0)='*'
DayName (1)="new moon"
DayName (2)="2"
DayName (3)="grade"
DayName (4)="4"
DayName (5)="fifth"
DayName (6)="which"
DayName (7)="month"
DayName (8)="8"
DayName (9)="double ninth"
DayName (10)="the 10th"
DayName (11)="11"
DayName (12)="12"
DayName (13)="13"
DayName (14)="14"
DayName (15)="15"
DayName (16)="16"
DayName (17)="17"
DayName (18)="18"
DayName (19)="19"
DayName (20)="20"
DayName (21)="21"
DayName (22)="22"
DayName (23)="23"
DayName (24)="24"
DayName (25)="25"
DayName (26)="26,"
DayName (27)="27"
DayName (28)="platoon"
Nuclear power: DayName (29)=""
DayName (30)="30"

'lunar month name
MonName (0)='*'
MonName (1)="is"
MonName (2)="2"
MonName (3)="three"
MonName (4)="4"
MonName (5)="5"
MonName (6)="6"
MonName (7)="7"
MonName (8)="eight"
MonName (9)="nine"
MonName (10)="ten"
MonName (11)="11"
MonName (12)="12"

The number of days' in front of the calendar month
MonthAdd (0)=0
MonthAdd=31 (1)
MonthAdd (2)=59
MonthAdd (3)=90
MonthAdd (4)=120
MonthAdd (5)=151
MonthAdd (6)=181
MonthAdd (7)=212
MonthAdd (8)=243
MonthAdd (9)=273
MonthAdd (10)=304
MonthAdd (11)=334

'the lunar data
NongliData (0)=1706
NongliData (1)=2773
NongliData (2)=133557
NongliData (3)=1206
NongliData (4)=398510
NongliData (5)=2638
NongliData (6)=3366
NongliData (7)=335142
NongliData (8)=3411
NongliData (9)=1450
NongliData (10)=200042
NongliData (11)=2413
NongliData (12)=723293
NongliData (13)=1197
NongliData (14)=2637
NongliData (15)=399947
NongliData (16)=3365
NongliData (17)=3410
NongliData (18)=334676
NongliData (19)=2906
NongliData (20)=1389
NongliData (21)=133467
NongliData (22)=1179
NongliData (23)=464023
NongliData (24)=2635
NongliData (25)=2725
NongliData (26)=333477
NongliData (27)=1746
NongliData (28)=2778
NongliData (29)=199350
NongliData (30)=2359
NongliData (31)=526639
NongliData (32)=1175
NongliData (33)=1611
NongliData (34)=396618
NongliData (35)=3749
NongliData (36)=1706
NongliData (37)=267628
NongliData (38)=2734
NongliData (39)=2350
NongliData (40)=203054
NongliData (41)=3222
NongliData (42)=465557
NongliData (43)=3402
NongliData (44)=3493
NongliData (45)=330581
NongliData (46)=1386
NongliData (47)=2669
NongliData (48)=264797
NongliData (49)=1325
NongliData (50)=529707
NongliData (51)=2709
NongliData (52)=2890
NongliData (53)=399018
NongliData (54)=2773
NongliData (55)=1370
NongliData (56)=267450
NongliData (57)=2651
NongliData (58)=1323
NongliData (59)=202023
NongliData (60)=1683
NongliData (61)=462419
NongliData (62)=1706
NongliData (63)=2773
NongliData (64)=330165
NongliData (65)=1206
NongliData (66)=2647
NongliData (67)=264782
NongliData (68)=3350
NongliData (69)=531750
NongliData (70)=3410
NongliData (71)=3498
NongliData (72)=396650
NongliData (73)=1389
NongliData (74)=1198
NongliData (75)=267421
NongliData (76)=2605
NongliData (77)=3349
NongliData (78)=138021
NongliData (79)=3410

Get the current system time
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • ASP
  • Related