修改下以前代码 不知满足否- @echo off
- for /f "skip=1 delims=" %%i in ('"wmic path Win32_LocalTime get Month,Day,Year"') do call:lp %%i Wk
- echo %Wk%
- pause&exit
- :lp
- setlocal enabledelayedexpansion
- set /a "y=%3,m=%2,d=%1,w=y-1,i=1461*w/4+429,w=(w+w/4-1)%%7+1"
- set /a "m=(m+9)%%12+4,y-=m/14"
- set /a "i=1461*y/4+153*m/5+d-i,i=(i-1+w)/7+1"
- endlocal&set %4=%i%
复制代码
|