velocity 调用自定义方法,日期函数替例
velocity 调用自定义方法,日期函数为例toolbox.xml$date- Oct 19, 2003 9:54:50 PM$date.long- October
velocity 调用自定义方法,日期函数为例
toolbox.xml
$date -> Oct 19, 2003 9:54:50 PM
$date.long -> October 19, 2003 9:54:50 PM PDT
$date.medium_time -> 9:54:50 PM
$date.full_date -> Sunday, October 19, 2003
$date.get('default','short') -> Oct 19, 2003 9:54 PM
$date.get('yyyy-M-d H:m:s') -> 2003-10-19 21:54:50
Example of formatting an arbitrary date:
$myDate -> Tue Oct 07 03:14:50 PDT 2003
$date.format('medium',$myDate) -> Oct 7, 2003 3:14:50 AM