| Converts a calendar date into days since 1900 (Sybase epoch).
Algorithm from Fliegel, H F and van Flandern, T C (1968).
Communications of the ACM, Vol 11, No 10 (October, 1968).
INTEGER FUNCTION JD (YEAR,MONTH,DAY)
C
C---COMPUTES THE JULIAN DATE (JD) GIVEN A GREGORIAN CALENDAR
C DATE (YEAR,MONTH,DAY).
C
INTEGER YEAR,MONTH,DAY,I,J,K
C
I= YEAR
J= MONTH
K= DAY
C
JD= K-32075+1461*(I+4800+(J-14)/12)/4+367*(J-2-(J-14)/12*12)
2 /12-3*((I+4900+(J-14)/12)/100)/4
C
RETURN
END
throws: java.sql.SQLException - if the date is outside the accepted range, 1753-9999 |