Format a Date with Velocity

  Hi, what would be the correct way to format a date using Velocity in the File Templates? I would like a format similar to Jan 12 2012. I've been trying various Velocity examples without success.  Thanks

3 comments
Comment actions Permalink

Hi Pete,

It would be '${MONTH_NAME_SHORT} ${DAY} ${YEAR}'

Denis

0
Comment actions Permalink

Thanks, that worked for me. As a side note, when I tried to open the File Templates Setting IntelliJ through an Exception. Seems there is a problem with the latest Google Protocol Buffer Plugin. Also, where would ${MONTH_NAME_SHORT} ${DAY} ${YEAR} have been documented? I couldn't find it

Thanks again

0
Comment actions Permalink

You're welcome.

I wrote protobuf autohor about the exception.

Regarding the variables - found them at source code. They have been introduced at IDEA-80344 and the documentation hasn't been updated. Our tech writers team is informed.

Denis

0

Please sign in to leave a comment.