Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - __daynames day names array http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __daynames          Day names array
------------------------------------------------------------------------------
 Declaration
   date.hdr

 Syntax
   char(15) __daynames[ 7 ]

 Default
   "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",
   "Sunday".

 Description
   The __daynames[] system array is composed of 7 elements to hold the
   strings for the day names. This array is used by the cdow()
   function.

   The contents of the system array can be replaced by different
   strings to translate the day names to another language.

 Example
   #define EXAMPLE_DATE
   #include example.hdr

   #define SPANISH
   
   #ifdef GERMAN
     vardef
       char(15) aDays[7] := "Montag",
                            "Dienstag",
                            "Mittwoch",
                            "Donnerstag",
                            "Freitag",
                            "Samstag",
                            "Sonntag"
     enddef
   #endif
   
   #ifdef FRENCH
     vardef
       char(15) aDays[7] := "Lundi",
                            "Mardi",
                            "Mercredi",
                            "Jeudi",
                            "Vendredi",
                            "Samedi",
                            "Dimanche"
     enddef
   #endif
   
   #ifdef ITALIAN
     vardef
       char(15) aDays[7] := "Luned.",
                            "Marted.",
                            "Mercoled.",
                            "Gioved.",
                            "Venerd.",
                            "Sabado",
                            "Domenica"
     enddef
   #endif
   
   #ifdef SPANISH
     vardef
       char(15) aDays[7] := "Lunes",
                            "Martes",
                            "Mi.rcoles",
                            "Jueves",
                            "Viernes",
                            "S.bado",
                            "Domingo"
     enddef
   #endif
   
   #ifdef HUNGARIAN
     vardef
       char(15) aDays[7] := "vas.rnap",
                            "h.tf.",
                            "kedd",
                            "szerda",
                            "cs.t.rt.k",
                            "p.ntek",
                            "szombat"
     enddef
   #endif
   
   proc Test_daynames
   vardef
      uint n
   enddef
   ? cdow( today() )
   for n := 0 to 6
      __daynames[ n ] := aDays[ n ] // replace day names
   next
   ? cdow( today() )
   endproc

   proc main
   Test_daynames()
   endproc

See Also: __monthnames cdow()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson