You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/08/28 18:09:49 UTC

Date formatting (was: Re: floating point types (Somewhat OT))

Please bother to change the subject...

on 8/28/01 6:45 AM, "Humberto Hernadez Torres" <hh...@itweb.com.mx>
wrote:

> I have a related question regarding Date types. I am using Velocity and
> Turbine. Acording to the Object Model an entity object has a field of
> type Date. When this field is printed from velocity it is printed using
> a predefined format. I would like to change the printing format. That is
> presentation logic. Right?
> 
> --
> Humberto

You can use a Tool to do the formatting of the dates. Look at Scarab for
examples. Format.java is the class you want to look at.

http://Scarab.tigris.org/

thanks,

-jon


Re: Date formatting (was: Re: floating point types (Somewhat OT))

Posted by Nathan Bubna <na...@esha.com>.
----- Original Message -----
From: "Geir Magnusson Jr." <ge...@optonline.net>
To: <ve...@jakarta.apache.org>
Sent: Wednesday, August 29, 2001 8:52 AM
Subject: Re: Date formatting (was: Re: floating point types (Somewhat OT))


> On 8/28/01 1:48 PM, "Sean Legassick" <se...@informage.net> wrote:
>
> > In message <00...@RATBERT>, Nathan Bubna
> > <na...@esha.com> writes
> >> i submitted a context tool specifically for this purpose to Geir, but
last i
> >> checked he still hadn't thrown it into rupert
> >>
(http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/rupert/src/java/org/a
> >> pache/commons/rupert/) yet.  if you'd like, email me directly and i'll
send
> >> you a copy.
> >
> > Actually I wrote a formatting tool which does dates amongst other things
> > (originally for WebMacro) way before Velocity existed. Bizarrely a
> > Velocity adaptation (VelocityFormatter) still lives somewhere in the
> > Velocity core, and probably should be moved out.
> >
> > It also has some other useful stuff (well to me anyway). I've got my own
> > private copy of this going with some bugfixes etc (a lot of it was
> > removing weird stuff I did to get around WebMacro bugs - no need for
> > that with VTL!). I'm happy to share my improvements if there's a
> > sensible place to put it...
>
> Sure - to Rupert it goes! :)

cool.

> And Nathan, my apologies.

aw, no need to apologize.
I already have the code myself,
I just thought it might come in handy to someone else. :)

keep up the great work!

Nathan

>
> Geir
>
>


Re: Date formatting (was: Re: floating point types (Somewhat OT))

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 8/28/01 1:48 PM, "Sean Legassick" <se...@informage.net> wrote:

> In message <00...@RATBERT>, Nathan Bubna
> <na...@esha.com> writes
>> i submitted a context tool specifically for this purpose to Geir, but last i
>> checked he still hadn't thrown it into rupert
>> (http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/rupert/src/java/org/a
>> pache/commons/rupert/) yet.  if you'd like, email me directly and i'll send
>> you a copy.
> 
> Actually I wrote a formatting tool which does dates amongst other things
> (originally for WebMacro) way before Velocity existed. Bizarrely a
> Velocity adaptation (VelocityFormatter) still lives somewhere in the
> Velocity core, and probably should be moved out.
> 
> It also has some other useful stuff (well to me anyway). I've got my own
> private copy of this going with some bugfixes etc (a lot of it was
> removing weird stuff I did to get around WebMacro bugs - no need for
> that with VTL!). I'm happy to share my improvements if there's a
> sensible place to put it...

Sure - to Rupert it goes! :)

And Nathan, my apologies.

Geir


Re: Date formatting (was: Re: floating point types (Somewhat OT))

Posted by Sean Legassick <se...@informage.net>.
In message <00...@RATBERT>, Nathan Bubna 
<na...@esha.com> writes
>i submitted a context tool specifically for this purpose to Geir, but last i
>checked he still hadn't thrown it into rupert
>(http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/rupert/src/java/org/a
>pache/commons/rupert/) yet.  if you'd like, email me directly and i'll send
>you a copy.

Actually I wrote a formatting tool which does dates amongst other things 
(originally for WebMacro) way before Velocity existed. Bizarrely a 
Velocity adaptation (VelocityFormatter) still lives somewhere in the 
Velocity core, and probably should be moved out.

It also has some other useful stuff (well to me anyway). I've got my own 
private copy of this going with some bugfixes etc (a lot of it was 
removing weird stuff I did to get around WebMacro bugs - no need for 
that with VTL!). I'm happy to share my improvements if there's a 
sensible place to put it...

Sean

-- 
Sean Legassick
sean@informage.net
         Soy un hombre: nada humano me es extrano

Re: Date formatting (was: Re: floating point types (Somewhat OT))

Posted by Nathan Bubna <na...@esha.com>.
> > I have a related question regarding Date types. I am using Velocity and
> > Turbine. Acording to the Object Model an entity object has a field of
> > type Date. When this field is printed from velocity it is printed using
> > a predefined format. I would like to change the printing format. That is
> > presentation logic. Right?
> >
> > --
> > Humberto
>
> You can use a Tool to do the formatting of the dates. Look at Scarab for
> examples. Format.java is the class you want to look at.

i submitted a context tool specifically for this purpose to Geir, but last i
checked he still hadn't thrown it into rupert
(http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/rupert/src/java/org/a
pache/commons/rupert/) yet.  if you'd like, email me directly and i'll send
you a copy.

>
> http://Scarab.tigris.org/
>
> thanks,
>
> -jon
>
>