|
O1(主程式)
- a* u: a$ n% ?G65P2X2011.Y05.Z01.
! ]: y! T+ _9 bM0" t0 w) @ ^1 Z* H7 |% k2 o' D
G65P2X2012.Y02.Z29., S- \ s; h: Y
M0
" Z" m P# J4 t/ \! x' \- `' }/ P3 P* W- |0 F1 t: m
X表示西元,Y月份,Z是幾號) ]2 l9 T3 o" G: h* [$ g
. K% U5 j3 U/ u/ g7 x5 a2 ~
5 O. q7 H) i/ w O
%
* H1 s7 B9 f4 s9 L# e- S3 Z' ~O2(副程式)
, p5 Q' v7 o4 i. W4 C#100=0. (平年) T+ t( X: X# ^4 ?, O! U& B
IF[#24MOD4.EQ0.]THEN#100=1.(預(yù)設(shè)閏年三月份+1天)% k& t6 }7 f3 l+ {: o& }
#1=31. * |& t/ Y: c, p# h
#2=59.+#1006 H* }; P/ J$ R% y! b
#3=90.+#100# e) U" ?5 T) Q7 i1 m
#4=120.+#100
2 V0 q* |9 R5 m \#5=151.+#100
. n+ b; R2 I5 e, O( y% x#6=181.+#100
/ G" V$ S7 H! K/ S6 |. [#7=212.+#100
2 E4 w; K- r/ h% @* }6 X. F#8=243.+#100
+ f9 j% h6 @9 w7 S4 | ^4 B0 s#9=273.+#100! {( e2 V: O6 k# K1 V9 `/ P4 ^# i/ g
#10=304.+#100
6 S0 n% G0 P4 k9 J#11=334.+#100
& w" \2 V: A9 k9 i& U* N#101=#[#25-1.]+#26 公式:(月數(shù)-1.)+日數(shù)
( I# L# H8 Y- Z {#102=#24-1./ U' x- t5 K {
#103=FIX[#102/4.]. X6 a" U5 H @$ H4 @
#104=FIX[#102/100.]
' R& b1 G1 s: X4 O: u( @. M4 W5 N#105=FIX[#102/400.]; E3 ]8 ]8 u/ \
#106=#102+#103-#104+#105+#101' H. D `9 a& x: W7 S1 |+ E
#107=#106MOD7/ p. d- }: L7 k# ^( n% k( N# W3 V
IF[#107EQ0.]THEN#107=7.
W T5 `5 ^' U6 K' W( o. M6 dT#107M64 Q2 a" b# R O+ p0 Q
M99
3 T% a, _8 P! v0 j%0 G# @3 L1 o; X
, F7 R/ u, o# r8 ^9 f4 g
; L0 H5 e4 I% H2 D
|
|