Scoped GlideDateTime - getYearUTC()

Gets the year stored by the GlideDateTime object, expressed in the UTC time zone.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Number 4-digit year value in the UTC time zone.
var gdt = new GlideDateTime("2011-11-02 12:00:00"); 
gs.info(gdt.getYearUTC());

Output: