Convert from start date from Gregorian Time to Julian time.
Convert the end date from Gregorian Time to Julian time.
Get the difference between end and start (end - start)
Convert result to Gregorian Time again.
!/bin/ksh
# KornShell implementation of Julian Day functions
# ToJul and FromJul functions based on C routines presented by
# David Burki, The C Users Journal, Vol. 11 , No 2, February, 1993,
# page 30.
#
# Burki's algorithm was an adaptation of the FORTRAN code used to
# implement the algorithm presented by H. Fliegl and T. Van Flanders,
# Communications of the ACM, Vol. 11, No. 10, October, 1968, page 657.
function ToJul #month day year
{
# ToJul prints the Julian Day value for the date passed
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.