1、Public Function NongLi(Optional XX_DATE As Date)Dim MonthAdd(11), NongliData(99), TianGan(9), DiZhi(11), ShuXiang(11), DayName(30), MonName(12)Dim curTime, curYear, curMonth, curDayDim GongliStr, NongliStr, NongliDayStrDim i, m, n, k, isEnd, bit, TheDatecurTime = XX_DATETianGan(0) = “TianGan(1) = “T
2、ianGan(2) = “TianGan(3) = “TianGan(4) = “TianGan(5) = “TianGan(6) = “TianGan(7) = “TianGan(8) = “TianGan(9) = “DiZhi(0) = “DiZhi(1) = “DiZhi(2) = “DiZhi(3) = “DiZhi(4) = “DiZhi(5) = “DiZhi(6) = “DiZhi(7) = “DiZhi(8) = “DiZhi(9) = “DiZhi(10) = “DiZhi(11) = “ShuXiang(0) = “ShuXiang(1) = “ShuXiang(2) =
3、 “ShuXiang(3) = “ShuXiang(4) = “ShuXiang(5) = “ShuXiang(6) = “ShuXiang(7) = “ShuXiang(8) = “ShuXiang(9) = “ShuXiang(10) = “ShuXiang(11) = “DayName(0) = “*“DayName(1) = “DayName(2) = “DayName(3) = “DayName(4) = “DayName(5) = “DayName(6) = “DayName(7) = “DayName(8) = “DayName(9) = “DayName(10) = “DayN
4、ame(11) = “DayName(12) = “DayName(13) = “DayName(14) = “DayName(15) = “DayName(16) = “DayName(17) = “DayName(18) = “DayName(19) = “DayName(20) = “DayName(21) = “DayName(22) = “DayName(23) = “DayName(24) = “DayName(25) = “DayName(26) = “DayName(27) = “DayName(28) = “DayName(29) = “DayName(30) = “MonN
5、ame(0) = “*“MonName(1) = “MonName(2) = “MonName(3) = “MonName(4) = “MonName(5) = “MonName(6) = “MonName(7) = “MonName(8) = “MonName(9) = “MonName(10) = “MonName(11) = “MonName(12) = “MonthAdd(0) = 0MonthAdd(1) = 31MonthAdd(2) = 59MonthAdd(3) = 90MonthAdd(4) = 120MonthAdd(5) = 151MonthAdd(6) = 181Mon
6、thAdd(7) = 212MonthAdd(8) = 243MonthAdd(9) = 273MonthAdd(10) = 304MonthAdd(11) = 334NongliData(0) = 2635NongliData(1) = 333387NongliData(2) = 1701NongliData(3) = 1748NongliData(4) = 267701NongliData(5) = 694NongliData(6) = 2391NongliData(7) = 133423NongliData(8) = 1175NongliData(9) = 396438NongliDat
7、a(10) = 3402NongliData(11) = 3749NongliData(12) = 331177NongliData(13) = 1453NongliData(14) = 694NongliData(15) = 201326NongliData(16) = 2350NongliData(17) = 465197NongliData(18) = 3221NongliData(19) = 3402NongliData(20) = 400202NongliData(21) = 2901NongliData(22) = 1386NongliData(23) = 267611Nongli
8、Data(24) = 605NongliData(25) = 2349NongliData(26) = 137515NongliData(27) = 2709NongliData(28) = 464533NongliData(29) = 1738NongliData(30) = 2901NongliData(31) = 330421NongliData(32) = 1242NongliData(33) = 2651NongliData(34) = 199255NongliData(35) = 1323NongliData(36) = 529706NongliData(37) = 3733Non
9、gliData(38) = 1706NongliData(39) = 398762NongliData(40) = 2741NongliData(41) = 1206NongliData(42) = 267438NongliData(43) = 2647NongliData(44) = 1318NongliData(45) = 204070NongliData(46) = 3477NongliData(47) = 461653NongliData(48) = 1386NongliData(49) = 2413NongliData(50) = 330077NongliData(51) = 119
10、7NongliData(52) = 2637NongliData(53) = 268877NongliData(54) = 3365NongliData(55) = 531109NongliData(56) = 2900NongliData(57) = 2922NongliData(58) = 398042NongliData(59) = 2395NongliData(60) = 1179NongliData(61) = 267415NongliData(62) = 2635NongliData(63) = 661067NongliData(64) = 1701NongliData(65) =
11、 1748NongliData(66) = 398772NongliData(67) = 2742NongliData(68) = 2391NongliData(69) = 330031NongliData(70) = 1175NongliData(71) = 1611NongliData(72) = 200010NongliData(73) = 3749NongliData(74) = 527717NongliData(75) = 1452NongliData(76) = 2742NongliData(77) = 332397NongliData(78) = 2350NongliData(7
12、9) = 3222NongliData(80) = 268949NongliData(81) = 3402NongliData(82) = 3493NongliData(83) = 133973NongliData(84) = 1386NongliData(85) = 464219NongliData(86) = 605NongliData(87) = 2349NongliData(88) = 334123NongliData(89) = 2709NongliData(90) = 2890NongliData(91) = 267946NongliData(92) = 2773NongliDat
13、a(93) = 592565NongliData(94) = 1210NongliData(95) = 2651NongliData(96) = 395863NongliData(97) = 1323NongliData(98) = 2707NongliData(99) = 265877 = GongliStrcurYear = Year(curTime)curMonth = Month(curTime)curDay = Day(curTime)GongliStr = curYear & “If (curMonth 2) ThenTheDate = TheDate + 1End IfisEnd
14、 = 0m = 0DoIf (NongliData(m) (Int(NongliData(m) / 65536) + 1) ThencurMonth = curMonth - 1End IfEnd If = NongliStrNongliStr = “ & TianGan(curYear - 4) Mod 60) Mod 10) & DiZhi(curYear - 4) Mod 60) Mod 12) & “NongliStr = NongliStr & “(“ & ShuXiang(curYear - 4) Mod 60) Mod 12) & “)“ = NongliDayStrIf (curMonth 1) ThenNongliDayStr = “ & MonName(-1 * curMonth)ElseNongliDayStr = MonName(curMonth)End IfNongliDayStr = NongliDayStr & “NongliDayStr = NongliDayStr & DayName(curDay)NongLi = NongliStr & NongliDayStrEnd Function