Article View: borland.public.jbuilder.java.language
Article #7680Re: How do I change the default format string of a Locale?
From: John McGrath TeamB
Date: Fri, 25 May 2001 08:51
Date: Fri, 25 May 2001 08:51
24 lines
1866 bytes
1866 bytes
On Thu, 24 May 2001 13:52:41 -0600, Daniel Spiess wrote:
> I need to change the date/time pattern for a locale.
>
> I know you can use the SimpleDateFormat object to specify a
> pattern, but I would like to change the pattern for a locale
> so that the locale uses the pattern I specify, not the default.
>
> In particular the en_US locale specifies the date format to be
> M/d/yy. I would like the US locale format to be MM/dd/yyyy.
I don't know of any way that you can do this. The format string comes
from a ListResourceBundle in the core Java classes, and an instance of
it is created by a static method, also in the core classes. Since it
is not possible to replace these classes, I suspect there is now way.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.1577d4c86f50c9bd98a222@forums.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!sunqbc.risq.qc.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnewsReferences:
<3b0d669c$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,2a6337d296e50c30 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-05-25 02:14:05 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.language Subject: Re: How do I change the default format string of a Locale? Date: Fri, 25 May 2001 04:51:20 -0400 Message-ID: <MPG.1577d4c86f50c9bd98a222@forums.borland.com> References: <3b0d669c$1_1@dnews> X-Newsreader: MicroPlanet Gravity v2.30 NNTP-Posting-Host: 209.92.40.60 X-Trace: dnews 990780679 209.92.40.60 (25 May 2001 01:51:19 -0700) Lines: 24 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!sunqbc.risq.qc.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews