home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol12n22.zip
/
D2JUL.ZIP
/
D2JUL
next >
Wrap
Text File
|
1993-11-30
|
634b
|
22 lines
*****************************************************************
* FUNCTION d2jul
* Returns a character string of length 3, left padded with zeros
* reflecting the number of the day of the year: 001-365 or 366.
*****************************************************************
FUNCTION d2jul
PARAMETER adate
lcyearset=SET("CENTURY")
SET CENTURY ON
lcdatedisp=SET("DATE")
SET DATE TO ANSI
IF PARAMETERS()=0
bdate=DATE()
ELSE
bdate=adate
ENDIF
startjulian=CTOD(STR(YEAR(bdate)-1)+".12.31")
miljulian= PADL(LTRIM(STR(bdate-startjulian)),3,"0")
SET CENTURY &lcyearset
SET DATE TO &lcdatedisp
RETURN miljulian