codetrix - v1.5.0
    Preparing search index...

    Function getYear

    • Returns the full year from a given date.

      Parameters

      • date: Date

        The date object to extract the year from.

      Returns number

      Full year (e.g., 2025).

      getYear(new Date(2025, 6, 23)); // 2025