home *** CD-ROM | disk | FTP | other *** search
- /*
- Program: GFMONTH()
- System: GRUMPFISH LIBRARY
- Author: Greg Lief
- Copyright (c) 1988-90, Greg Lief
- Clipper 5.x Version
- Compile instructions: clipper gfmonth /n/w/a
- */
-
- #include "grump.ch"
-
- function gfmonth(mdate)
- local buffer := substr(set(_SET_DATEFORMAT), 1, 8)
- default mdate to date()
- do case
- /*
- SET DATE BRITISH or FRENCH -- I use French as the default because
- I have more clients in France than the UK -- if you want to change
- this, just recompile this PRG with the following command-line syntax:
- clipper gfmonth /dBRITISH
- */
- case buffer = "dd/mm/yy"
- #ifdef BRITISH
- buffer := cmonth(mdate)
- #else
- buffer := {'Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', ;
- 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', ;
- 'Decembre' }[month(mdate)]
- #endif
-
- /* SET DATE GERMAN */
- case buffer = "dd.mm.yy"
- buffer := {'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', ;
- 'Juli', 'August', 'September', 'Oktober', 'November', ;
- 'Dezember' }[month(mdate)]
-
- otherwise
- buffer := cmonth(mdate)
- endcase
- return buffer
-
- * end function GFMonth()
- *--------------------------------------------------------------------*
-
- * eof gfmonth.prg
-