Your best bet is to use the static factory methods in the DateFormat class.
ie:
Locale locale = getLocale(request); //Use struts Action method to get locale
dateTimeFormat =
ateFormat.getDateTimeInstance( DateFormat.SHORT,DateFormat.SHORT, locale);
dateFormat = DateFormat.getDateInstance(
and not
SimpleDateFormat.
Suresh
-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 9:11 AM
To: Struts Users Mailing List
Subject: RE: [OT] Date format
Your best bet is to use the static factory methods in the
DateFormat class.
ie:
Locale
January 2003 11:41
To: Struts Users Mailing List
Subject: RE: [OT] Date format
Your best bet is to use the static factory methods in the DateFormat class.
ie:
Locale locale = getLocale(request); //Use struts Action method to get locale
dateTimeFormat =
ateFormat.getDateTimeInstance( DateFormat.SHORT
Mailing List'; [EMAIL PROTECTED]
Subject: RE: [OT] Date format
Hi,
What I am looking for is how to display the *format*, and not how to
display a date in a given format. So, there doesn't seem to be anything
provided with the API.
I need a method like toPattern() of SimpleDateFormat
RE: [OT] Date formatWith SimpleDateFormat you specify the format as a String. You
surely should be able to display that string.
What I am looking for is how to display the *format*, and not how to
display a date in a given format. (snip)
5 matches
Mail list logo