home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
binaries
/
datetime.lha
/
DateTime.e
< prev
Wrap
Text File
|
1993-06-13
|
835b
|
41 lines
MODULE 'Arp', 'libraries/ArpBase'
ENUM ER_NONE,
ER_MEM
RAISE ER_MEM IF String () = NIL
PROC main () HANDLE
DEF dt : datetime
IF (arpbase := OpenLibrary ('arp.library', 39)) = NIL
Raise ('Error opening arp.library V39+')
ENDIF
dt.format := FORMAT_INT
dt.strday := String (10)
dt.strdate := String (25)
dt.strtime := String (10)
DateStamp (dt.stamp)
IF StamptoStr (dt) = 0
WriteF ('Day = \s\n', dt.strday)
WriteF ('Date = \s\n', dt.strdate)
WriteF ('Time = \s\n', dt.strtime)
ELSE
Raise ('Error converting datestamp.')
ENDIF
CloseLibrary (arpbase)
CleanUp (0)
EXCEPT
SELECT exception
CASE ER_NONE; NOP
CASE ER_MEM; WriteF ('Out of memory.\n')
DEFAULT; WriteF ('\s\n', exception)
ENDSELECT
IF arpbase THEN CloseLibrary (arpbase)
CleanUp (5)
ENDPROC