The listing below provides two functions for Julian Day conversions that I implemented in KornShell based on C routines appearing in The C Users Journal.
Save the listing to a file, source it ( [tt]. <filename>[/tt] ), and then yesterday's date can be calculated like so:
# 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.