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

  1. /*
  2.    Program: GFDAY()
  3.    System: GRUMPFISH LIBRARY
  4.    Author: Greg Lief
  5.    Copyright (c) 1988-90, Greg Lief
  6.    Clipper 5.x Version
  7.    Compile instructions: clipper gfday /n/w/a
  8. */
  9.  
  10. #include "grump.ch"
  11.  
  12. function gfday(mdate)
  13. local buffer := substr(set(_SET_DATEFORMAT), 1, 8)
  14. default mdate to date()
  15. do case
  16.    /*
  17.       SET DATE BRITISH or FRENCH -- I use French as the default because
  18.       I have more clients in France than the UK -- if you want to change
  19.       this, just recompile this PRG with the following command-line syntax:
  20.          clipper gfmonth /dBRITISH
  21.    */
  22.    case buffer = "dd/mm/yy"
  23.       #ifdef BRITISH
  24.          buffer := cdow(mdate)
  25.       #else
  26.          buffer := {'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', ;
  27.                    'Vendredi', 'Samedi' }[dow(mdate)]
  28.       #endif
  29.  
  30.    /* SET DATE GERMAN */
  31.    case buffer = "dd.mm.yy"
  32.       buffer := {'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', ;
  33.                  'Donnerstag', 'Freitag', 'Samstag' }[dow(mdate)]
  34.  
  35.    otherwise
  36.       buffer := cdow(mdate)
  37. endcase
  38. return buffer
  39.  
  40. * end function GFDay()
  41. *--------------------------------------------------------------------*
  42.  
  43. * eof gfday.prg
  44.