set UDAY=0
for /L %%i in (1971,1,%YEAR%) do (
set /a temp1="%%i%%4"
::Remainder when divided by 4
set /a temp2="%%i%%100"
::Remainder when divided by 100
set /a temp3="%%i%%400"
::Remainder when divided by 400
if %temp1%==0 if not %temp2%==0 set /a UDAY="%UDAY%+366"&set TAG=r else if %temp3%==0 set /a UDAY="%UDAY%+366"&set TAG=r else set /a UDAY="%UDAY%+365"&set TAG=p)
::The code is to determine whether it is a leap year and accumulate days
It seems that the tempx is not calculated, and I can't figure it out. Great guys, please give me some pointers, thank you very much!
[ Last edited by hhl on 2006-11-1 at 10:32 PM ]
for /L %%i in (1971,1,%YEAR%) do (
set /a temp1="%%i%%4"
::Remainder when divided by 4
set /a temp2="%%i%%100"
::Remainder when divided by 100
set /a temp3="%%i%%400"
::Remainder when divided by 400
if %temp1%==0 if not %temp2%==0 set /a UDAY="%UDAY%+366"&set TAG=r else if %temp3%==0 set /a UDAY="%UDAY%+366"&set TAG=r else set /a UDAY="%UDAY%+365"&set TAG=p)
::The code is to determine whether it is a leap year and accumulate days
It seems that the tempx is not calculated, and I can't figure it out. Great guys, please give me some pointers, thank you very much!
[ Last edited by hhl on 2006-11-1 at 10:32 PM ]
