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

  1. /*
  2.    Program: GFMONTH()
  3.    System: GRUMPFISH LIBRARY
  4.    Author: Greg Lief
  5.    Copyright (c) 1988-90, Greg Lief
  6.    Clipper 5.x Version
  7.    Compile instructions: clipper gfmonth /n/w/a
  8. */
  9.  
  10. #include "grump.ch"
  11.  
  12. function gfmonth(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 := cmonth(mdate)
  25.       #else
  26.          buffer := {'Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', ;
  27.                      'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', ;
  28.                      'Decembre' }[month(mdate)]
  29.       #endif
  30.  
  31.    /* SET DATE GERMAN */
  32.    case buffer = "dd.mm.yy"
  33.       buffer := {'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', ;
  34.                   'Juli', 'August', 'September', 'Oktober', 'November', ;
  35.                   'Dezember' }[month(mdate)]
  36.  
  37.    otherwise
  38.       buffer := cmonth(mdate)
  39. endcase
  40. return buffer
  41.  
  42. * end function GFMonth()
  43. *--------------------------------------------------------------------*
  44.  
  45. * eof gfmonth.prg
  46.