How to Automatically Insert Formatted Dates in Visual Studio Code
Sheik Mostafizur
Posted on October 12, 2024
When writing code or documentation, having the current date formatted correctly can save you time and help keep your projects organized. In Visual Studio Code (VSCode), while there's no built-in functionality for inserting formatted dates like "Oct 12, 2024" directly, there are effective methods to achieve this. In this post, we’ll explore how to insert formatted dates using snippets and extensions in VSCode.
Step-by-Step Guide
/************ Current Date **************/
"Insert Current Date": {
"prefix": "currentDate",
"body": [
"${CURRENT_MONTH_NAME_SHORT} ${CURRENT_DATE}, ${CURRENT_YEAR}"
],
"description": "Insert the current date in Oct 10, 2024 format"
}
How to use it?
- Go to any file then write currentDate
- If auto suggestion not work press ctrl+space
Follow me
💖 💪 🙅 🚩
Sheik Mostafizur
Posted on October 12, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
watercooler Why does a reboot make your PC run SO much faster than running all the cleaning tools you can possibly imagine?
November 30, 2024