monthName Function

Top  Previous  Next

Gets a month name string.

Syntax

DateTime.monthName(month [, numchar])

Arguments

monthAn integer in the range 0 - 11 specifying the month. Note that 0 = January -- month numbers are one less than common notation.
numcharAn optional integer giving the maximum number of characters to return in the string.

Return Value

A string with the English name for the month. If numchar is given, the string will be no more than numchar characters, allowing you to easily retrieve the name as an abbreviation.

Examples

DateTime.monthName(2)// returns "March"
DateTime.monthName(0,3)// returns "Jan"