MonthName: Difference between revisions
Jump to navigation
Jump to search
(Add javascript snippet) |
|||
Line 5: | Line 5: | ||
MonthName returns the string name of the given month. The required parameter, ''month'', is a numeric expression ranging from 1 to 12. The optional parameter, ''abbreviate'', is a boolean variable that specifies whether MonthName returns the complete month name or its three-letter abbreviation. | MonthName returns the string name of the given month. The required parameter, ''month'', is a numeric expression ranging from 1 to 12. The optional parameter, ''abbreviate'', is a boolean variable that specifies whether MonthName returns the complete month name or its three-letter abbreviation. | ||
== Example == | == Example (Basic) == | ||
<pre> | <pre> | ||
Line 11: | Line 11: | ||
Print MonthName(Month(NOW)) | Print MonthName(Month(NOW)) | ||
Print MonthName(12, TRUE) | Print MonthName(12, TRUE) | ||
</pre> | |||
== Example (JavaScript) == | |||
<pre> | |||
// MonthName Example | |||
var MonthName=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; | |||
Today = new Date(); | |||
NSB.Print(MonthName[Today.getMonth()]); | |||
NSB.Print(MonthName[11]); | |||
</pre> | </pre> | ||
Revision as of 02:21, 28 May 2013
MonthName(month[, abbreviate])
Description
MonthName returns the string name of the given month. The required parameter, month, is a numeric expression ranging from 1 to 12. The optional parameter, abbreviate, is a boolean variable that specifies whether MonthName returns the complete month name or its three-letter abbreviation.
Example (Basic)
Rem MonthName Example Print MonthName(Month(NOW)) Print MonthName(12, TRUE)
Example (JavaScript)
// MonthName Example var MonthName=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; Today = new Date(); NSB.Print(MonthName[Today.getMonth()]); NSB.Print(MonthName[11]);
Output
August Dec