[ 
https://issues.apache.org/jira/browse/VELTOOLS-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14646402#comment-14646402
 ] 

Chris Pimlott commented on VELTOOLS-135:
----------------------------------------

As a workaround, you can add the JodaTime static classes to you velocity 
context and use them directly:

{code}
context.put("DateTimeFormat", DateTimeFormat.class);
context.put("DateTimeZone", DateTimeZone.class);
{code}

{code}
#set( $dateTimeFormatter = ${DateTimeFormat.forPattern('MM/dd/yyyy h:mm aa 
zz').withZone(${DateTimeZone.forID("US/Pacific")})} )

  Due Date: $!{dateTimeFormatter.print($dueDate)}
{code}

> Support Joda Time in $date tool
> -------------------------------
>
>                 Key: VELTOOLS-135
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-135
>             Project: Velocity Tools
>          Issue Type: Wish
>          Components: GenericTools
>    Affects Versions: 2.0
>            Reporter: David Parks
>            Priority: Minor
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> The $date tool doesn't support Joda Time formats. This may be as simple as 
> just updating the ConversionUtil class to convert Joda time objects to 
> java.util.Date types.
> If updating ConversionUtils it might also be nice to get that from a Factory 
> class that can be configured so that users can easily extend ConversionUtils 
> to support other formats such as this. As is it's not easy to extend 
> ConversionUtils.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to