GlideDateTime - getMonth()

Gets the month stored by the GlideDateTime object, expressed in Java Virtual Machine time zone.

Use getMonthLocalTime() and getMonthUTC() instead of this method.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Number The numerical value of the month, Jan=1, Dec=12.

var gdt = new GlideDateTime(); //December
gs.print(gdt.getMonth());

Output: 12