NetBeans代码模板$ {date}? [英] NetBeans Code Templates ${date}?
本文介绍了NetBeans代码模板$ {date}?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Eclipse中有此代码模板
I have this code template in Eclipse
@自$ {date}
输入后,我得到的是这样的东西:
when entered i get something like this :
@自4.8.2009起
但是当我将相同的模板( @自$ {date} )添加到NetBeans时 它输出
But when i add the same template (@since ${date}) to NetBeans it outputs
@自日期
有人可以帮忙吗?
Can someone help ?
还没有答案吗?这在Netbeans中是不可能的吗?
No answer yet ? Is this not possible in Netbeans ???
推荐答案
类似以下示例的内容应该可以完成这项工作:
Something like the following example should doing the job :
${date?date?string("yyyy")}.${date?date?string("MM")}.${date?date?string("dd")}
- yyyy => 4个元素的年份(例如:2012年)
- MM =>每月2个元素(例如:3月-> 03)
- dd =>每月的2个元素(例如23)
- . =>您要分隔每个字段的分隔符(例如:-或/或.或其他) 您应该在netbeans帮助中的某处检查可用格式(对不起,我暂时没有找到有关此格式的信息). 我看到这是一个非常老的帖子,但是如果它对某人有用的话... 问候. ollie314
- yyyy => year on 4 elements (ex: 2012)
- MM => Month on 2 elements (ex: march -> 03)
- dd => Day of the month on 2 elements (ex: 23)
- . => separator you want to separate each fields (ex: - or / or . or smth else) You should have to check about available format somewhere in the netbeans help (sorry I don't find out informations about this for now). I see that's a very old post, but if it may usefull for someone ... regards. ollie314
这篇关于NetBeans代码模板$ {date}?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文