Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NetBeans Code Templates ${date}?

I have this code template in Eclipse

@since ${date}

when entered i get something like this :

@since 4.8.2009

But when i add the same template (@since ${date}) to NetBeans it outputs

@since date

Can someone help ?

No answer yet ? Is this not possible in Netbeans ???

like image 250
Ari B Avatar asked Aug 04 '09 11:08

Ari B


1 Answers

Something like the following example should doing the job :

${date?date?string("yyyy")}.${date?date?string("MM")}.${date?date?string("dd")}
  • 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
like image 149
ollie314 Avatar answered Nov 16 '22 01:11

ollie314