GlideDateTime - setYearUTC(Number year)

Sets the year stored by the GlideDateTime object to a specified value using the UTC time zone.

Table 1. Parameters
Name Type Description
year Number The year to change to.
Table 2. Returns
Type Description

Scoped equivalent

To use the setYearUTC() method in a scoped application, use the corresponding scoped method: Scoped GlideDateTime - setYearUTC(Number year).

var gdt = new GlideDateTime();

Output: 2013