SHARE
TWEET

Untitled

a guest Jun 25th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mm=%%a&set dd=%%b&set yy=%%c)
  2.  set /a dd=100%dd%%%100,mm=100%mm%%%100
  3.  set /a z=14-mm,z/=12,y=yy+4800-z,m=mm+12*z-3,Jd=153*m+2
  4.  set /a Jd=Jd/5+dd+y*365+y/4-y/100+y/400-32045
  5.  set /a y=yy+4798,Jp=y*365+y/4-y/100+y/400-31738,t=Jp+3,Jp=t-t%%7
  6.  set /a y=yy+4799,Jt=y*365+y/4-y/100+y/400-31738,t=Jt+3,Jt=t-t%%7
  7.  set /a y=yy+4800,Jn=y*365+y/4-y/100+y/400-31738,t=Jn+3,Jn=t-t%%7
  8.  set /a Jr=%Jp%,yn=yy-1,yn+=Jd/Jt,yn+=Jd/Jn
  9.  if %Jd% GEQ %Jn% (set /a Jr=%Jn%) else (if %Jd% GEQ %Jt% set /a Jr=%Jt%)
  10.  set /a diff=Jd-Jr,cw=diff/7+1,wd=diff%%7,wd+=1
  11.  if %cw% LSS 10 set cw=0%cw%
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top