Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : NN0506.ZIP
Filename : GDAY.PRG

 
Output of file : GDAY.PRG contained in archive : NN0506.ZIP
/*
Program: GDAY() (with apologies to those Down Under)
Author: Greg Lief
Copyright (c) 1991 Greg Lief
Dialect: Clipper 5.0
Excerpted from Grumpfish Library
Compile instructions: clipper gday /n /w [ /dBRITISH ]
*/

function GDay(mdate)
local buffer := substr(set(_SET_DATEFORMAT), 1, 8)
mdate := if(mdate == NIL, date(), mdate)
do case
/*
SET DATE BRITISH or FRENCH -- in memory of my Swiss grandmother,
I use French as the default -- if you want to change this,
just recompile this .prg with the following command-line syntax:
clipper gday /n/dBRITISH
*/
case substr(buffer, 1, 8) == "dd/mm/yy"
#ifdef BRITISH
buffer := cdow(mdate)
#else
buffer := {'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', ;
'Vendredi', 'Samedi' }[dow(mdate)]
#endif

/* SET DATE GERMAN */
case substr(buffer, 1, 8) == "dd.mm.yy"
buffer := {'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', ;
'Donnerstag', 'Freitag', 'Samstag' }[dow(mdate)]

otherwise
buffer := cdow(mdate)
endcase
return buffer

* end function GDay()
*--------------------------------------------------------------------*

* eof gday.prg


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : NN0506.ZIP
Filename : GDAY.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/