home *** CD-ROM | disk | FTP | other *** search
- * Program.: CAL2JUL.PRG
- * Author..: Anonymous, modified by Luis A. Castro.
- * Date....: 1/12/83, 11/20/83, 01/19/84
- * Notice..: Copyright 1983 & 1984, Ashton-Tate, All Rights Reserved
- * Version.: dBASE II, version 2.4x
- ¬ Notes...║ Calenda≥ t∩ juliaε date conversion.
- * Local...: t:year, t:month, t:day
- *
- * IN: mdate-C-8 Calendar date, assumes date is in
- * MM/DD/YY format, and a valid date.
- * OUT: julian-N-6 Julian date
- *
- STORE VAL($(mdate,1,2)) TO t:month
- STORE VAL($(mdate,4,2)) TO t:day
- STORE VAL($(mdate,7,2) ) + 1900 TO t:year
- STORE INT( 30.57 * t:month ) +;
- INT( 365.25 * t:year - 395.25 ) + t:day TO julian
- *
- * ---Adjust the julian date on leap year.
- IF t:month > 2
- STORE julian - 1 TO julian
- IF INT( t:year / 4 ) * 4 <> t:year
- STORE julian - 1 TO julian
- ENDIF
- ENDIF
- *
- RELEASE t:year, t:month, t:day
- RETURN
- * EOF: CAL2JUL.PRG