『楼 主』:
[原创]人体生物节律钟-趣味东:309254515
@echo off&title 人体生物节律钟-趣味东:309254515&color 2b&setlocal enabledelayedexpansion
echo.&echo.%date% %time%&set dm=more +45 %0&!dm!
for /l %%i in (1 1 30) do set hx=!hx!-&set tg=!tg!&set kg=!kg!
:sr:: 人体生物节律钟-趣味东:309254515
echo.公历日(阳历)为准-直接回车查看全部&set/p sr=生日[ 截止日|默认今日 ]:&echo.!hx!
if /i "!sr!"=="wl" (set/p=正在打开网页万年历 请稍等.. !tg!<nul&start [url]http://www.baidu.com/s?wd=[/url]万年历
ping /n 5 127.1>nul&set/p sr=!kg!!tg!)
(for /f "tokens=1*" %%a in ('!dm!') do (if defined qc set sr=%%b&echo.%%a&call:qc
if %%a==wl (if "!sr!"=="" set qc=1) else (if !sr!==%%a set sr=%%b)))&if defined qc set qc=&goto sr
:qc
call:ymd&set by=!y!&set bt=!ts!
::本年前天数
set/a "1/!bs:~,4!"2>nul&&(set/a "nl=!bs:~,4!-y")||(set bs=!date!&set/a "nl=!date:~,4!-y")
call:rs !y! !nl!&set/a zs-=ts&echo 起历经!nl!个年头!rs!个闰年;
::本年天数
set sr=!bs!&call:ymd&set/a zs+=!ts!,jl=18&echo. 起止共计!zs!天
::三节律状态
for %%i in (体力 情绪 智力) do (set/ajl+=5,lj="(jl+2)/2",js=zs%%jl,"sq=js/lj*2+^!(js%%lj)"
set /p= %%i !js!/!jl! 处在 <nul&for %%p in (高潮期 低转高-临界 低潮期 高转低-临界) do (
set/a"1/sq"2>nul&&set/asq-=1||(set/a"sq=4"&echo. %%p)))
::三临界相交日(by bt己赋值)
echo.&echo.三临界相交日:&for %%i in (644 2772 3416 3795 4439 6567 7211 21252 21896 24024 24668
25047 25691 27819 28463 42504 43148 45276 45920 46299 46943 49071 49715 63756 64400) do (
set/a "nl=(bt+%%i)/365"&call:rs !by! !nl!&set/a jc=%%i-zs+bt
if !jc! leq 0 set/a nl-=1&call:rs !by! !nl!&set/a jc=%%i-zs+bt
set/a y=by+nl&call:run !y!&set m=
for /l %%i in (0 1 12) do (set/a ts=0,n=%%i,ts="30*n+(8*n/7-3)/2+(2/n)*(3-2*n)"2>nul
(if %%i gtr 1 set ts+=1)&if !ts! geq !jc! if not defined m (set m=%%i&set/a d=dx)
set/a dx=jc-ts)
(for %%i in (m d) do set x=0!%%i!&set %%i=!x:~-2!)&echo !nl!岁 !y!-!m!-!d!)
echo.&echo.!hx!&set sr=&set/a"1/qc"2>nul&&goto:eof||goto sr
-------------------------
:ymd
for /f "tokens=1-3* delims=闰平:年/月-日,.;'>|&!=' " %%c in ("!sr!")do set y=%%c&set m=%%d&set d=%%e&set bs=%%f
for %%i in (y m d) do (if !%%i! geq a echo 出错更改!&set sr=!date!&goto ymd)&set x=000!%%i!&set/a%%i=1!x:~-4!-10000
call:run !y!&set/p=!y!!run!年!m!月!d!日 <nul
set/a ts=0,n=m-1,ts="30*n+(8*n/7-3)/2+(2/n)*(3-2*n)"2>nul
(set/a ts+=d,"1/(m/3)"2>nul&&set/a ts+=r)&set/p=年内第!ts!天 <nul&goto:eof
:run
(set/a r="^!(%1%%4)^^^!(%1%%100)|^!(%1%%400)","1/r"2>nul&&set run=闰||set run=平)&goto:eof
:rs
set/a y'=%1+%2-1,rs=0
for /l %%i in (%1 1 !y'!) do call:run %%i&set/a rs+=r
set/a zs=%2*365+rs+1&goto:eof
-------------------------
代码 生日(追加本批方便查询!)
wl 网页万年历
0 !date!
1 2009 08 09
2 2008:01 :1
3 2008- 2-29
4 2008 /3/1
5 2000年1月1日 [ Last edited by qwd on 2009-8-29 at 10:58 ]
|