GLib.DateTime.prototype.get_year

function get_year(): Number(gint) {
    // Gjs wrapper for g_date_time_get_year()
}
  

Retrieves the year represented by datetime in the Gregorian calendar.

Since 2.26

Returns

the year represented by datetime