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 - month() return the number of the month http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 month()             Return the number of the month
------------------------------------------------------------------------------
 Declaration
   date.hdr

 Syntax
   func int month extern
   param value date dDate

 Arguments
   dDate is the date value to convert.

 Return
   An integer between 1 and 12.

 Description
   The month() function returns the number of the month as derived from
   dDate. January is month 1 and December is month 12.

 Example
   #define EXAMPLE_DATE
   #include example.hdr

   proc Test_month
   // Use mailing lists based upon seasons
   vardef
      uint nMonth
   enddef
   nMonth := month( today() )
   ? "Mailing list needed: "
   do case
   case nMonth == 11
      ?? "Xmas list"
   case nMonth ==  9
      ?? "Halloween list"
   case nMonth ==  5
      ?? "Summer list"
   otherwise
      ?? "None"
   endcase
   endproc

   proc main
   Test_month()
   endproc

See Also: day() year()

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