home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
techs.zip
/
TECH12.ARC
/
CALJUL.PRG
next >
Wrap
Text File
|
1985-11-01
|
738b
|
24 lines
* Program ...: Caljul.PRG
* Author ....: Clay Carley
* Date ......: July 1, 1985
* Version ...: dBASE II, any version
* Note(s)....: Converts a date passed as a character variable
* named (date) in the form MM/DD/YY and returns a
* numeric memory variable named (jul:date) in Julian
* format.
*
STORE VAL( $( date,1,2 ) ) TO month
STORE VAL( $( date,4,2 ) ) TO day
STORE VAL( $( date,7,2 ) ) + 1900 TO year
STORE INT( 30.57 * month ) + INT( 365.25 * year - 395.25 ) + day TO jul:date
IF month > 2
IF INT( year / 4) = year / 4
STORE jul:date - 1 TO jul:date
ELSE
STORE jul:date - 2 TO jul:date
ENDIF
ENDIF
RELEASE day, month, year
RETURN
* EOP Caljul.PRG