From: Deborah G. <gol...@ap...> - 2004-07-28 22:33:08
|
I agree. This is actually necessary for Hawaiian (jb 3646) as well; the numeric month names in short dates are supposed to be Roman numerals. Of course, this could be handled by the new "narrow" month names, but there is no way to invoke those in a date format yet, and I'm not sure it's an appropriate use of "narrow", which is supposed to be, well, narrow. The Roman numeral for August is four characters: VIII, which is actually wider than the abbreviated form. Being able to do it with an RBNF would be nice. You would need some syntax to attach an RBNF (or more generally, message format) to a date format. That would probably mean usurping some non-letters as pattern meta-characters. Deborah On Jul 28, 2004, at 10:28 AM, Mark Davis wrote: > I like the direction, but I'd like this to be somewhat broader; in > particular, allow some way for ordinals to be used date formats, e.g. > for > "January 20th, 2005" > > Mark > > ----- Original Message ----- > From: "Doug Felt" <df...@ya...> > To: <ic...@os...> > Sent: Wednesday, July 28, 2004 10:14 > Subject: proposal, add rule based number formatting to ICU message > format > > >> Please respond by August 11th. This proposal applies to both ICU and > ICU4J. >> This is for jitterbug #4019. >> >> The proposal is to extend the message format syntax to provide >> support for >> RuleBasedMessageFormat. >> >> MessageFormat currently has a three-argument syntax for subformats, > consisting >> of an index, a format type keyword, and a subformat style or pattern > (which can >> be elided). The current format type keywords are number, date, time, >> and >> choice. >> >> RuleBasedNumberFormat has three types of standard rules-- spellout, > ordinal, >> and duration. Each of these can have multiple 'rulesets', to further > customize >> the behavior-- for example, some languages require gender or plural >> forms. >> >> In order to keep the existing MessageFormat three-argument syntax, I > propose >> adding three new format type keywords-- 'spellout', 'ordinal', and > 'duration'-- >> and allowing the ruleset name to be specified in the subformat >> pattern. > For >> example, the pattern "{0,spellout,%masculine}" would obtain the >> spellout > rules >> for the MessageFormat's locale, and set the ruleset named >> '%masculine' on > the >> formatter. If no ruleset name is specified, the default ruleset >> would be > used. >> >> >> RuleBasedNumberFormat normally throws an exception if an unrecognized > ruleset >> name is provided to it. In order to make the use of MessageFormat a >> bit > more >> robust in the case case of a data mismatch between the format string >> and > the >> locale data for RuleBasedNumberFormat, I propose to catch this >> exception > inside >> MessageFormat and use the default ruleset. >> >> Doug >> >> >> >> >> >> __________________________________ >> Do you Yahoo!? >> New and Improved Yahoo! Mail - 100MB free storage! >> http://promotions.yahoo.com/new_mail >> _______________________________________________ >> icu mailing list >> ic...@os... >> http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu >> > > _______________________________________________ > icu mailing list > ic...@os... > http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu |