回复 3# bgst
楼主的要求比较简单,借 3 楼代码小改一下也可兼容月底日期:- @echo off
- setlocal EnableDelayedExpansion
- set "date="
- for /f "tokens=1,2,3 delims=/- " %%i in ("%date%") do set year=%%i&set mon=%%j&set date=%%k
- set /A date=!date!+1
- date %year%/%mon%/%date%||(
- set /a "mon+=1,year+=mon/13,mon%%=12,date=1"
- date !year!/!mon!/!date!
- )
复制代码
|