What Brother 12th Floor said, I'm a bit confused. Hehe
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
@echo off
mode con: lines=12 cols=40
setlocal enabledelayedexpansion
for %%a in (一,二,三,四,五,六,日) do (
set /a a+=1
set j!a!=%%a)
for %%b in (31,28,31,30,31,30,31,31,30,31,30,31) do (
set /a y+=1
set s!y!=%%b)
::::::::::::::::::::::::::::::Add year function
set /p year=Check which year?
cls
set /a year_chk1=year%%400
set /a year_chk2=year%%4
set /a year_chk3=year%%100
if %year_chk1% equ 0 set s2=29
if %year_chk2% equ 0 if %year_chk3% neq 0 set s2=29
::::::::::::::::::::::::::::::End of addition
set /p m=Check which month?
cls
set n=%m%
set /a n-=1
for /l %%c in (1,1,%n%) do (
set /a day+=!s%%c!)
set b=0
for /l %%d in (1,1,!day!) do (
set /a b+=1
if !b! equ 8 set b=1)
if %m% equ 1 set b=7
echo 一 二 三 四 五 六 日
echo.
set flag= 一二三四五六日一二三四五六日
:::::::::::::::::::::::::::::::::Add year function
set /a yearflag=(%year%+(%year%-1)/4-(%year%-1)/100+(%year%-1)/400)%%7
if %yearflag% equ 1 goto endadjust
if %yearflag% equ 0 set yearflag=7
set /a yearflag-=1
set /a yeartemp=0-yearflag
set flag= !flag:~%yeartemp%!一二三四五六日一二三四五六日
set flag=!flag:~0,15!
echo %flag%>C:\ag.txt
:endAdjust
:::::::::::::::::::::::::::::::::End of addition
for /l %%f in (1 1 13) do (
if "!flag:~%%f,1!"=="!j%b%!" (
if "!j%%f!"=="一" (set /p s= <nul&set zh=6&goto next)
if "!j%%f!"=="二" (set /p s= <nul&set zh=5&goto next)
if "!j%%f!"=="三" (set /p s= <nul&set zh=4&goto next)
if "!j%%f!"=="四" (set /p s= <nul&set zh=3&goto next)
if "!j%%f!"=="五" (set /p s= <nul&set zh=2&goto next)
if "!j%%f!"=="六" (set /p s= <nul&set zh=1&goto next)
if "!j%%f!"=="日" (set /p s=<nul&set zh=7&goto next)
))
:next
for /l %%e in (1 1 !s%m%!) do (
set /a b+=1
if !b! equ 8 set b=1
if %%e lss 10 (set /p= %%e<nul) else (set /p= %%e<nul)
if !fl!==0 (set /a z+=1)
if !z!==7 (echo.&set z=0)
if %%e==!zh! (echo.
set fl=0
)
)
pause>nul
| Rater | Score | Time |
|---|---|---|
| huzixuan | +4 | 2007-04-26 02:47 |