home *** CD-ROM | disk | FTP | other *** search
- /*
- Program: GFDAY()
- System: GRUMPFISH LIBRARY
- Author: Greg Lief
- Copyright (c) 1988-90, Greg Lief
- Clipper 5.x Version
- Compile instructions: clipper gfday /n/w/a
- */
-
- #include "grump.ch"
-
- function gfday(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 := cdow(mdate)
- #else
- buffer := {'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', ;
- 'Vendredi', 'Samedi' }[dow(mdate)]
- #endif
-
- /* SET DATE GERMAN */
- case buffer = "dd.mm.yy"
- buffer := {'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', ;
- 'Donnerstag', 'Freitag', 'Samstag' }[dow(mdate)]
-
- otherwise
- buffer := cdow(mdate)
- endcase
- return buffer
-
- * end function GFDay()
- *--------------------------------------------------------------------*
-
- * eof gfday.prg
-