Re: Locale Question

"Mark Davis" <[email protected]>
Newsgroups gmane.comp.lib.icu.general
Message-ID <117a01c39f00$c6ffdfe0$92d2399d@DAVIS1>
A Message Format will parse, but you would have to have the locale exactly
matching the formats that are used in the string. For more generality, you would
parse the string (except for the variable sections) with Regex, then use
NumberFormat, DateFormat, etc to parse the variable portions.

Note that we currently do not yet parse an arbitrary currency value; that is an
RFE that we had wanted to do for this release but were not able to squeeze in.

Mark
__________________________________
http://www.macchiato.com
► शिष्यादिच्छेत्पराजयम् ◄

----- Original Message ----- 
From: "Dave Elliott" <[email protected]>
To: "ICU" <[email protected]>
Sent: Thu, 2003 Oct 30 06:28
Subject: Locale Question


> I have skimmed through ICU 2.6 Documentation and was
> looking
> for some insight.
>
> Given I have a string such as:
> "The car costs $10,000 and was shipped on 10/30/2003"
> and I wish to display the information in the format
> of a specific language/country.
>
> Would I have to use the RegexMatcher to find the text
> (ie 10/30/2003), parse (to date object), format to the
> new locale (yyyy/mm/dd) and then replace the text?
>
> I don't have the luxury of building the string from
> scratch.
> I must use a string provided and then convert it.
>
> I realize things like currency are not converted but the
> display would be changed from the dollar symbol (USD) to
> the pound symbol (GBP).
>
> As I am just getting started with all of this, any insight
> on how to do this or do it better would be appreciated.
>
> Thanks,
> Dave
>
> =====
> =======================================
> Dave Elliott
>
> [email protected]   <Work>
> [email protected]      <Home>
> ========================================
>
> __________________________________
> Do you Yahoo!?
> Exclusive Video Premiere - Britney Spears
> http://launch.yahoo.com/promos/britneyspears/
> _______________________________________________
> icu mailing list
> [email protected]
> http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.