home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e051 / 2.ddi / LIB / CALENDAR.OPS < prev    next >
Encoding:
Text File  |  1985-07-15  |  817 b   |  22 lines

  1. (external date ;action
  2.           day month year leapyear dayofyear day-name month-name 
  3.           days-in-period day-of-week explode)
  4.  
  5. (call date)    ; put todays date into working memory.
  6.  
  7. (p introductory
  8.    (todays-date <day> <month> <year>)
  9. -->
  10.    (write (explode |Hello and welcome to |) |OPS5+|(crlf)(crlf))
  11.    (bind <dow> (day-of-week <day> <month> <year>))
  12.    (bind <dayname> (day-name <dow>))
  13.    (bind <monthname> (month-name <month>))
  14.    (bind <doy> (dayofyear <day> <month> <year>))
  15.    (bind <ly> (leapyear <day> <month> <year>))
  16.    (bind <daysleft> (compute 365 + <ly> - <doy>))
  17.    (write |today is| <dayname> <day> <monthname> <year> (crlf)
  18.           |Which| is the <doy> day of the year. 
  19.           |Only| <daysleft> days remain this year (crlf)(crlf)))
  20.  
  21. ; End of C interface example.
  22.