Somethings that may work for you.....may not:
Please check out:
thread52-66450 /\/ETtoyeur Wrote this a while ago in one of the groups.....maybe it will help you.
#---------------- CUT HERE ------------------------------------
#!/bin/ksh
function JulDate
{
print $1 $2 $3 | awk '
{
y=$1; m=$2; d=$3;
if (m < 3) {y=y - 1; m=m + 12}
a=int(y / 100.0);
b=int(a / 4.0);
c=2.0 - a + b;
e=int(365.25 * (y + 4716.0));
f=int(30.6001 * (m + 1.0));
jd=c + d + e + f - 1524.5;
printf "%1.1f", jd;
}'
}
print "Yesterday's date is $m1/$d1/$y1"
print "Two-days-ago's date is $m2/$d2/$y2"
print "Three-days-ago's date is $m3/$d3/$y3"
#--------------------------------------------------------------
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.