getYear
Signature
Section titled “Signature”getYear(): stringimport { getYear } from "@northguild/gmt/plain/get";Return the current year as a zero-padded string in the system timeZone.
- Uses Temporal.Now.zonedDateTimeISO to get current year in system timezone.
- Returns zero-padded string (e.g., “2024”).
- Returns “” when system timezone is unavailable.
Returns
Section titled “Returns”current year string (zero-padded) or “” on invalid
Examples
Section titled “Examples”getYear() // "2024"getYear() // "" (when system timeZone unavailable)