質問
How to get current year in dotCMS? I need to display it in footer copyright. I am try this $date.format('YYYY', $UtilMethods.getCurrentDate())
but not working.
解決
$dateString = $date.format('yyyy',$UtilMethods.getCurrentDate())
Not sure entirely, looks right, maybe try lower case 'yyyy' is the only difference I found in research.
他のヒント
This will give the result 2012: $date.format('yyyy',$UtilMethods.getCurrentDate())
Here you can find alot more about dotCMS and Velocity http://dotcms.org/documentation/VelocityAndDotCMS
所属していません StackOverflow