๐Ÿšง๐Ÿ—๏ธ๐Ÿ‘ท๐ŸพNote: This site is under construction. Expect a lot of broken links and layouts. Have feedback? Email me at [email protected]

Home โ†’ Farai's Codelab

An ISO 8601 Date Snippet For VS Code

Published: Updated:

I use this VS Code snippet to get granular times for my post’s front matter. Note that the +02:00 is my timezone SASTโ€”use your own timezone. There’s no ${CURRENT_TIMEZONE} unfortunately. UPDATE 17 November 2024: There is ${CURRENT_TIMEZONE_OFFSET}, actually

"ISO Date": {
    "prefix": "iso8601",
    "description": "Outputs an iso8601 date (YYYY-MM-DDTHH:MM:SS+02:00)",
    "body": "${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}T${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}${CURRENT_TIMEZONE_OFFSET}"
}