| Contents |
#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. | |
| String | cc_month_str (Integer nMonth) This function is available as a Microsoft Excel add-in. |
| char*month_str( | int | nMonth | )[const] |
#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
| nMonth | is 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; |