GlideDateTime - getDaysInMonth()

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

Use getDaysInMonthLocalTime() and getDaysInMonthUTC() instead of this method.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Number The number of days in the current month in the Java Virtual Machine time zone.

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

Output: 31