CodeCogs - An iteractive open source Numerical library Welcome... Login
CodeCogs
shopping cart
OSXWindowsLinux
Search CodeCogs
Numerical Components

Valid RSS

UnitsDate

month str

Available under GPL (Free) and Commercial licence
get a GPL licence
COST (GBP)
this unit 1.04
sub units 0.00
add a commercial licence to your cart
0
viewed 2069 times and licensed 13 times

Returns a string pointer to the month of the year.

Controller: CodeCogs  Contact Controller
+View version details
Contents hide toc
buy now     get GPL     add to cart

Interface

#include <codecogs/units/date/month_str.h>

using namespace Units::Date;

char* month_str (int nMonth)
Returns a string pointer to the month of the year.
ExcelString cc_month_str (Integer nMonth)
This function is available as a Microsoft Excel add-in.

Function Documentation

 
char*month_strintnMonth )[const]
Returns a string pointer to a description of the month specified, i.e. 1="January", 2=February, 3="March"
Example 1:
The months of the year are therefore:
#include <stdio.h>
#include <codecogs/units/date/month_str.h>
#include <codecogs/units/date/constants.h>
 
using namespace Units::Date;
 
int main()
{
  for(int i=January;i<=December;i++)
    printf("\n Month number [%d] is %s ", i, month_str(i));
  return 0;
}
Output:
Month number [1] is January
Month number [2] is February
Month number [3] is March
Month number [4] is April
Month number [5] is May
Month number [6] is June
Month number [7] is July
Month number [8] is August
Month number [9] is September
Month number [10] is October
Month number [11] is November
Month number [12] is December
Parameters:
nMonthis the numeric value of the month in the range 1 to 12 (inclusive). Values outside this range are wrapped back into range. So nMonth=13 is the same as nMonth=1;
Authors:
Will Bateman (Sep 2004)
Source Code:

To view or download source code you need either a GPL or Commercial Licence.

buy now     get GPL     add to cart

Not a member, then Register with CodeCogs. Already a Member, then Login.


Page Comments

Format Excel Equations

  You must login to leave a messge


Last Modified: 24 Feb 08 @ 10:41     Page Rendered: 2010-03-11 20:32:30

Valid CSS!   Valid XHTML 1.0 Transitional