• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Velocity Templates and Dates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Velocity Templates and Dates


  • Subject: Velocity Templates and Dates
  • From: Johann Werner <email@hidden>
  • Date: Fri, 3 Sep 2010 13:33:49 +0200

Hi list (or probably rather Mike ;-),

I am trying to get the year string automatically into my velocity project templates. I found two related JIRAs (http://issues.objectstyle.org/jira/browse/WOL-755, http://issues.objectstyle.org/jira/browse/WOL-1159) that are unresolved yet. Apart of the velocity variable ${Date) that was mentioned on this list and that returns a plain string of the long formatted timestamp which of course lacks date specific methods (e.g. in my case ${Date.get('yyyy')} to get '2010') I could not find any way to achieve my goal.
I am going with the temporary hack now to get to it by extracting a substring: ${Date.substring(6,10)} but that smells fishy. I think it would be very helpful to add the GenericTools from the VelocityTools (http://velocity.apache.org/tools/devel/generic.html) for the processing of EOGenerator-, EOModelDoc- and WOLips Project-templates as this adds a bunch of useful classes.

Any thoughts on this?

jw

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: WOO file
  • Next by Date: Re: WOLips and Special Language Characters
  • Previous by thread: Re: WOO file
  • Next by thread: Synchronized Editing Context for Locking/Unlocking
  • Index(es):
    • Date
    • Thread