Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save szaranger/fba6bab3e439152aa0c1652b7c79ec57 to your computer and use it in GitHub Desktop.
Save szaranger/fba6bab3e439152aa0c1652b7c79ec57 to your computer and use it in GitHub Desktop.
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