Skip to content

Instantly share code, notes, and snippets.

@aheissenberger
Last active February 18, 2021 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aheissenberger/53eb7266150d577a1d6861c070265e6d to your computer and use it in GitHub Desktop.
Save aheissenberger/53eb7266150d577a1d6861c070265e6d to your computer and use it in GitHub Desktop.
locale time Date time string for file names
new Date().toLocaleString( 'sv', { timeZoneName: 'short' } ).replace(/(-|:| )/g,'').substr(0,12)
// uses 'sv' for Sweden as they use something similar to ISO format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment