- @echo off&setlocal enabledelayedexpansion
- for %%a in (1一六 2二五 3三四 4四三 5五二 6六一 0天天) do (
- set "str=%%a"
- set "_!str:~,1!=!str:~1,1!"&set "_!str:~1,1!=!str:~,1!"&set ".!str:~,1!=!str:~2,1!"
- )
- set /p num=请输入向后的天数:
- if %num% lss 0 (set "x=前") else (set "x=后")
- if %num% lss -!_%date:~-1%! (set "y=.") else (set "y=_")
- set /a d2=num+_%date:~-1%&set "d2=!d2:-=!"
- set /a d2=d2%%7
- cls&echo.&echo 今天是%date:~-3%,%num:-=%天%x%是星期!%y%%d2%!
- pause>nul
复制代码
[ 本帖最后由 batman 于 2008-10-17 11:28 编辑 ] |