Sal Stone
2008-07-30 15:17:22 UTC
Hi,
I'm trying to change format of date/time in Java Class template...
from this: "Jul 30, 2008, 3:27:05 PM"
to this: "July 30, 2008, 3:27 PM"
In NetBeans 6.1 Tools/Templates Java Class gives me this:
/*
* ${name}.java
*
* Created on ${date}, ${time}
*/
...
When I create new class I get:
"Jul 30, 2008, 3:27:05 PM"
But if I create new JFrame I get this:
"July 30, 2008, 3:27 PM"
I see that "Java Class template" is using FreeMarker and "JFrame template "
not...
I looked in the manual
http://wiki.netbeans.org/FaqFreeMarker
http://freemarker.org/docs/ref_builtins_date.html
http://freemarker.org/docs/ref_directive_setting.html
but I don't understand how this can be used inside Java Template...
Where does ${date} "variable" comes from, how can I change date_format or
is it possible to write some function to reformat date?
SS
I'm trying to change format of date/time in Java Class template...
from this: "Jul 30, 2008, 3:27:05 PM"
to this: "July 30, 2008, 3:27 PM"
In NetBeans 6.1 Tools/Templates Java Class gives me this:
/*
* ${name}.java
*
* Created on ${date}, ${time}
*/
...
When I create new class I get:
"Jul 30, 2008, 3:27:05 PM"
But if I create new JFrame I get this:
"July 30, 2008, 3:27 PM"
I see that "Java Class template" is using FreeMarker and "JFrame template "
not...
I looked in the manual
http://wiki.netbeans.org/FaqFreeMarker
http://freemarker.org/docs/ref_builtins_date.html
http://freemarker.org/docs/ref_directive_setting.html
but I don't understand how this can be used inside Java Template...
Where does ${date} "variable" comes from, how can I change date_format or
is it possible to write some function to reformat date?
SS