Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
BEGIN {
m[1]=31;m[2]=28;m[3]=31;m[4]=30;
m[5]=31;m[6]=30;m[7]=31;m[8]=31;
m[9]=30;m[10]=31;m[11]=30;m[12]=31;
}
{
y1 = substr($1,1,4)
m1 = substr($1,5,2)+0
d1 = substr($1,7,2)
y2 = substr($2,1,4)
m2 = substr($2,5,2)+0
d2 = substr($2,7,2)
if (y1==y2 && m1==m2)
dd = d2-d1
else {
m[2] = 28
if (y1%4==0 && (y1%100!=0 || y1%400==0)) m[2]=29
dd = m[m1]-d1
em = m2
if (y2>y1) em=13
for (i=m1+1;i<em;i++) dd+=m[i]
for (i=y1+1;i<y2;i++) {
dd+=365;
if (i%4==0 && (i%100!=0 || i%400==0)) dd++
}
if (y2>y1) {
m[2] = 28
if (y2%4==0 && (y2%100!=0 || y2%400==0)) m[2]=29
for (i=1;i<m2;i++) dd+=m[i]
}
dd+=d2;
}
print y1 " " m1 " " d1 " " y2 " " m2 " " d2 " " dd
}