getUTCFullYearintermediateconst d = new Date('2024-01-15T00:00:00.000Z')
d.getUTCFullYear() // β 2024Use getUTCFullYear() to retrieve the four-digit UTC year of a Date, regardless of local timezone.
Combining Date.UTC() with new Date() guarantees the correct UTC year.
Challenge: Verify that new Date(Date.UTC(2000, 0, 1)).getUTCFullYear() returns 2000.