DEV Community

Farai Gandiya
Farai Gandiya

Posted on Originally published at codelab.farai.xyz on

An ISO 8601 Date Snippet For VS Code

An ISO 8601 Date Snippet For VS Code was originally published on Farai's Codelab.


I use this VS Code snippet to get more 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"
}

Enter fullscreen mode Exit fullscreen mode

Thanks for reading. If you liked this post, support my work by sharing this post, refering me for a job, sponsoring me on Patreon, sending me money on Ko-fi, Paypal or Buy Me A Coffee. You could also use my affiliate links to buy something on Amazon or Namecheap. Note that I may earn a commisions through those links.

Got feedback? Email me at gandiyafarai + feedback at gmail dot com.

Top comments (0)