We're updating the issue view to help you get more done. 

Support global switch for 12 vs 24 hour

Description

Deleted Component: other

On Android, we'd like to support a customization that causes all time formats to be 12 hour vs 24 hour. When I was looking into supporting this, it appears that it can mostly be supported by the existing structure, but not quite. In addition, there appear to be bugs in some locales, exposed by this examination. Those will be filed separately.

(this description was modified after some substantial revisions)


The goal is to be able to find, for each country, the preferred hour format (h, H, k, K) and the allowed formats, so that if h is not used in the country, it isn't switched to. For example, someone could use a variant of DateTimePatternGenerator that changed the hour format, but would not change to 'h' if not permitted.

To do this, add data in the following form. As per committee decision this is keyed by region, and is kept in supplemental.

<timeData>
<hours preferred="H" allowed="H K h" regions="JP"/>
<hours preferred="H" allowed="H h" regions="001 AD AF AM AO AR AT AW AX AZ BA BE BF BG BI BJ BL BO BR BY BZ CD CF CG CH CI CL CM CO CR CU CV CW CZ DE DK DO EA EC EE ES FI FO FR GA GB GE GF GG GI GN GP GQ GT GW HN HR HT HU IC ID IE IM IR IS IT JE KG KM KZ LA LI LK LT LU LV MC MD ME MF MG MK ML MM MN MQ MT MU MX MZ NC NE NI NL NO NP PA PE PF PH PL PT PY RE RO RS RW SC SE SI SK SM SN SR ST SV SX TG TH TJ TL TO TR UA UY UZ VE VN YT"/>
<hours preferred="H" allowed="H" regions="IL RU"/>
<hours preferred="h" allowed="H h" regions="AE AG AL AS AU BB BD BH BM BN BS BT BW CA CN CY DJ DM DZ EG EH ER ET FJ FM GD GH GL GM GR GU GY HK IN IQ JM JO KE KH KI KN KP KR KW KY LB LC LR LS LY MA MH MO MP MR MW MY NA NG NZ OM PG PK PR PS PW QA SA SB SD SG SL SO SS SY SZ TC TD TN TT TW TZ UG UM US VC VG VI VU WS YE ZA ZM ZW"/>
</timeData>

The changes include a program to generate the data (with some overrides) and a test.

Environment

None

xpath

None

locale

None

Status

Assignee

Mark Davis

Reporter

Mark Davis

Labels

None

tracReporter

mark

tracOwner

mark

tracResolution

fixed

tracStatus

closed

Reviewer

Peter Edberg

phase

None

tracCc

None

tracCreated

Dec 06, 2012, 12:07 AM

Priority

major