Last active
February 18, 2021 15:16
-
-
Save aheissenberger/53eb7266150d577a1d6861c070265e6d to your computer and use it in GitHub Desktop.
locale time Date time string for file names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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