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 - __monthnames month names array http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __monthnames        Month names array
------------------------------------------------------------------------------
 Declaration
   date.hdr

 Syntax
   char(15) __monthnames[ 12 ]

 Default
   "January", "February", "March", "April", "May", "June", "July", "August",
   "September", "October", "November", "December"

 Description
   The __monthnames[] system array is composed of 12 elements to hold the
   strings for the month names. This array is used by the cmonth()
   function.

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

 Example
   #define EXAMPLE_DATE
   #include example.hdr

   #define ITALIAN
   
   #ifdef GERMAN
     vardef
       char(15) aMonths[12] := "Januar",
                               "Februar",
                               "M.rz",
                               "April",
                               "Mai",
                               "Juni",
                               "Juli",
                               "August",
                               "September",
                               "Oktober",
                               "November",
                               "Dezember"
     enddef
   #endif
   
   #ifdef FRENCH
     vardef
       char(15) aMonths[12] := "Janiver",
                               "F.vrier",
                               "Mars",
                               "Avril",
                               "Mai",
                               "Juin",
                               "Juillet",
                               "Ao.t",
                               "Septembre",
                               "Octobre",
                               "Novembre",
                               "D.cembre"
     enddef
   #endif
   
   #ifdef ITALIAN
     vardef
       char(15) aMonths[12] := "Gennaio",
                               "Febbraio",
                               "Marzo",
                               "Aprile",
                               "Maggio",
                               "Giugno",
                               "Luglio",
                               "Agosto",
                               "Settembre",
                               "Ottobre",
                               "Novembre",
                               "Dicembre"
     enddef
   #endif
   
   #ifdef SPANISH
     vardef
       char(15) aMonths[12] := "Enero",
                               "Febrero",
                               "Marzo",
                               "Abril",
                               "Mayo",
                               "Junio",
                               "Julio",
                               "Agosto",
                               "Septiembre",
                               "Octubre",
                               "Noviembre",
                               "Diciembre"
     enddef
   #endif
   
   #ifdef HUNGARIAN
     vardef
       char(15) aMonths[12] := "janu.r",
                               "febru.r",
                               "m.rcius",
                               ".prilis",
                               "m.jus",
                               "j.nius",
                               "j.lius",
                               "augusztus",
                               "szeptember",
                               "okt.ber",
                               "november",
                               "december"
     enddef
   #endif
   
   proc Test_monthnames
   vardef
      uint n
   enddef
   ? cmonth( today() )
   for n := 0 to 6
      __monthnames[ n ] := aMonths[ n ] // replace day names
   next
   ? cmonth( today() )
   endproc
   

   proc main
   Test_monthnames()
   endproc

See Also: __daynames cmonth()

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