GlideDateTime - getWeekOfYearLocalTime()

Gets the number of the week stored by the GlideDateTime object, expressed in the current user's time zone.

All weeks begin on Sunday. The first week of the year is the week that contains at least one day of the new year. The week beginning Sunday 2015-12-27 is considered the first week of 2016 as that week contains January 1 and 2.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
Number The number of the current week. The highest week number in a year is either 52 or 53.

Scoped equivalent

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

var gdt = new GlideDateTime("2011-12-01 12:00:00");

Output: 49