struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Kelly" <ke...@ipe.fzk.de>
Subject Re: Questions concerning Tiles
Date Fri, 28 Mar 2003 09:02:47 GMT
You may also want to have a look at the Calendar class as a method of
generating your Date objects.  There are several methods that are very
useful for getting Locale times, so users would get there local time, not
the time where you app is located.

If you have the Calendar in a Static class as Cedric sugested and write your
own methods for standard getDate() and getDate(Locale l), you will find the
time complexity around the 2-5 millisecond maker for the first, and 10-12
milliseconds for the second. Not too costly :-)

Cheers

Simon


----- Original Message -----
From: "Cedric Dumoulin" <cedric@apache.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Friday, March 28, 2003 9:48 AM
Subject: Re: Questions concerning Tiles


>
>   Hi Guillaume,
>
>   It is hard to say, I have never evaluated the cost of creation of a
> new Date object.
>   You need to evaluate this cost, and compare it against a solution
> where you cache the object. Maybe the Date implementation already do a
> kind of caching !
>   If not, it should be simple to create a singleton class(a static one)
> with one method: getDate(). This method cache the real object, and take
> care of updating it daily :-).
>
>   Cedric
>
> COMPAGNON GUILLAUME wrote:
>
> >C├ędric,
> >is that make sense to define a bean type for printing the today date with
> >the scope of the application ( in order not to instanciate the Date each
> >time) ?
> >
> >Thx!
> >Guillaume
> >
> >
> >----------------------------------------------------
> >Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
> >Toute utilisation ou diffusion non autorisee est interdite.Tout message
electronique est susceptible d'alteration.
> >Le CREDIT DU NORD et ses filiales declinent toute responsabilite au titre
de ce message s'il a ete altere, deforme ou falsifie.
> >This message and any attachments ( the "message") are confidential and
intended solely for the addressees.
> >Any unauthorised use or dissemination is prohibited.E-mails are
susceptible to alteration.
> >Neither CREDIT DU NORD nor any of its subsidiaries or affiliates shall be
liable for the message if altered, changed or falsified.
> >----------------------------------------------------
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message