neild3r / vscode-php-docblocker

Simple docblocker for php
MIT License
94 stars 31 forks source link

Add @created_date tag to the comments #145

Open jitin-joseph opened 4 years ago

jitin-joseph commented 4 years ago

image this is an example of created date in sublime text add a tag for @created_date in comments. It should return the current date and time if possible

smileBeda commented 1 year ago

@jitin-joseph you can achieve that by using the following in your template:

"whatever": {
            "content": "@whatever ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}"
        },

whatever is the name of your tag

You can add this to php-docblocker.propertyTemplate or php-docblocker.functionTemplate or php-docblocker.classTemplate

Note that however your new custom tag will NOT be picked up by PHPDoc for example. It would probably be better to use the @since tag which supports a Description, where you could insert the date as well.