Skip to content

Instantly share code, notes, and snippets.

@batazo
Created July 3, 2022 19:00
Show Gist options
  • Save batazo/6784936d167fde2085d9b44e2f29cf37 to your computer and use it in GitHub Desktop.
Save batazo/6784936d167fde2085d9b44e2f29cf37 to your computer and use it in GitHub Desktop.
Temporal Functions
const date = Temporal.Now.plainDateISO(); // Gets the current date
date.toString(); // returns the date in ISO 8601 date format
// If you additionally want the time:
Temporal.Now.plainDateTimeISO().toString(); // date and time in ISO 8601 format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment