在 PhpStorm 实时模板中插入当前时间或日期
Insert current time OR date in PhpStorm Live Template
如何在 PhpStorm 中插入当前时间的实时模板?
例如:
/**
* @author Person
* @time 27/07/2021
*/
当然,只需使用提供的预定义 date()
和 time()
函数以及所需格式作为参数:
https://www.jetbrains.com/help/phpstorm/edit-template-variables-dialog.html#predefined_functions
实时模板文本:
/**
* @author Person
* @time $DATE$ $TIME$
*/
Edit Variables(在可选参数中根据需要调整格式(使用Java's SimpleDateFormat——参见上述link中的函数说明)) :
上述模板的示例结果:
/**
* @author Person
* @time 27/07/2021 15:39:01
*/
如何在 PhpStorm 中插入当前时间的实时模板?
例如:
/**
* @author Person
* @time 27/07/2021
*/
当然,只需使用提供的预定义 date()
和 time()
函数以及所需格式作为参数:
https://www.jetbrains.com/help/phpstorm/edit-template-variables-dialog.html#predefined_functions
实时模板文本:
/**
* @author Person
* @time $DATE$ $TIME$
*/
Edit Variables(在可选参数中根据需要调整格式(使用Java's SimpleDateFormat——参见上述link中的函数说明)) :
上述模板的示例结果:
/**
* @author Person
* @time 27/07/2021 15:39:01
*/