VBScript MonthName Function

Definition and Usage

The MonthName function can return the name of the specified month.

Syntax

MonthName(month[,abbreviate])
Parameter Description
month Required. Specifies the month number. (For example, January is 1, February is 2, and so on.)
abbreviate Optional. A boolean value indicating whether to abbreviate the month name. The default is False.

Example

Example 1

document.write(MonthName(8))

Output:

August

Example 2

document.write(MonthName(8, true))

Output:

Aug

Note:In Chinese systems, it is still output as 'August'.