$DAY = @MDAY - 1
$MON = @MON + 0
$YEAR = @YEAR
If $DAY = 00 Then
$MON = @MON - 1
Switch $MON
Case 0
$YEAR = @YEAR - 1
$MON = 12
$DAY = 31
Case 1, 3, 5, 7, 8, 10
$DAY = 31
Case 2
$YEAR = @YEAR - 2E3
Do
$YEAR -= 4
If $YEAR = 0 Then $DAY = 29
If $YEAR < 0 Then $DAY = 28
Until $DAY = 0 Or $DAY < 0
Case 4, 6, 9, 11
$DAY = 30
EndSwitch
EndIf
If $DAY < 10 Then $DAY = '0' & $DAY
If $MON < 10 Then $MON = '0' & $MON
FileWrite('_'&$YEAR&'年'&$MON&'月'&$DAY&'日_早班+晚班.htm', 'TEST')
[ 本帖最后由 liongodmien 于 2008-11-10 20:54 编辑 ] |