@echo offset DaysAgo=1set Today=%date:~0,4%%date:~5,2%%date:~8,2%set /a PassDays=%Today%-1echo %PassDays%pause
跨月或者跨年楼上就知道这方法有多坑