An ISO 8601 Date Snippet For VS Code

Snippets

I use this VS Code snippet to get granular times for my post’s front matter. Note that the +0200 is my timezone SAST—use your own timezone. There’s no ${CURRENT_TIMEZONE} unfortunately.

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