tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: [OT] Getting a pattern from a DateFormat object
Date Thu, 25 Oct 2007 22:42:02 GMT
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: [OT] Getting a pattern from a DateFormat object
> 
> Does anyone know if I can get the pattern for a DateFormat object?

I don't think you can, since DateFormat is abstract; there's no
guarantee there's even a pattern involved.

> (It looks like DateFormat.getDateInstance(DateFormat.SHORT)
> actually returns a SimpleDateFormat object... anyone think
> it's a bad idea to bet on that?)

SimpleDateFormat is the only subclass in the JRE for DateFormat, so as
long as your apps don't do their own extending of DateFormat, you should
be safe.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message