Skip to content

getToday

getToday(): string

Return the current PlainDate as an ISO string in the system timeZone.

  • Uses Temporal.Now.zonedDateTimeISO to get current date in system timezone.
  • Returns "" when system timezone is unavailable.

ISO 8601 PlainDate string or "" on error

import { getToday } from "@northguild/gmt/plain/get";
getToday() // "2024-03-15" (current date)
output 

plain/get/getToday.ts