home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a067 / 1.img / GRUMP501.EXE / DATEWORD.PRG < prev    next >
Encoding:
Text File  |  1991-04-23  |  964 b   |  33 lines

  1. /*
  2.     Program: DATEWORD()
  3.     System: GRUMPFISH LIBRARY
  4.     Author: Greg Lief
  5.     Copyright (c) 1988-90, Greg Lief
  6.     Clipper 5.x Version
  7.     Compile instructions: clipper dateword /n/w/a
  8.  
  9.     Returns verbose date (e.g., 'December 25, 1988')
  10. */
  11.  
  12. //───── begin preprocessor directives
  13.  
  14. #include "grump.ch"
  15.  
  16. //───── end preprocessor directives
  17.  
  18. function dateword(mdate)
  19. default mdate to date()       // use system date if no date passed
  20. if valtype(mdate) == 'C'       // convert char string to date
  21.    mdate := ctod(mdate)
  22. endif
  23. /* check current date format to see if day should precede month */
  24. return if(substr(set(_SET_DATEFORMAT), 1, 2) == 'dd', ;
  25.           ltrim(str(day(mdate))) + ' ' + gfmonth(mdate), ;
  26.           gfmonth(mdate) + ' ' + ltrim(str(day(mdate))) ) + ', ' + ;
  27.           ltrim(str(year(mdate)))
  28.  
  29. * end function DateWord()
  30. *--------------------------------------------------------------------*
  31.  
  32. * eof dateword.prg
  33.