[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #4254(closed defect: fixed)

Opened 6 years ago

Last modified 3 years ago

Support alternate time formats for different number systems

Reported by: mark Owned by: mark
Component: design Data Locale:
Phase: dsub Review: emmons
Weeks: Data Xpath:
Xref:

Description

From an internal report: "I ... found that the time separator for Arabic is ":" which should only be used for English digits IMHO (0, 1, 2, 3), but not for native numerals (٠‎ - ١‎ - ٢‎)
I had a look at one newspaper (http://www.ahram.org.eg/) and found they use a comma to separate times when using native numerals, which sounds like the right spearator to me."

What we have in CLDR is the following.

<timeFormatLength type="full">

<timeFormat>

<pattern>zzzz h:mm:ss a</pattern>

</timeFormat>

</timeFormatLength>

I see two options:

  1. Have alternate time patterns for different numbering systems. I see this as messy.
  1. Interpret ":" in the patterns as a special symbol, like "." in numbers, that is replaced according to the number system being used for the digits. Add a new field <timeSeparator>٫</timeSeparator> to <numbers><symbols>, as below.

<symbols numberSystem="arab">

<decimal>٫</decimal>
<group>٬</group>
<list>؛</list>
<percentSign>٪</percentSign>
<plusSign>+</plusSign>
<minusSign>-</minusSign>
<exponential>اس</exponential>
<perMille>؉</perMille>
<infinity>∞</infinity>
<nan>ليس رقم</nan>
<timeSeparator>٫</timeSeparator> <!-- NEW -->

</symbols>

Attachments

Change History

comment:1 Changed 6 years ago by roozbeh@…

An independent question: Is it an ASCII comma or an Arabic decimal separator?

comment:2 Changed 6 years ago by pedberg

  • Cc pedberg added

I am concerned about anything (especially anything available via API) that presents the notion of a single time separator for a locale, since that is not valid for many locales. Even if those locales are not ones for which this alternate number system issue would be relevant, having a time separator field in NumberSymbols (for example) is dangerous because it will be misused by developers.

comment:3 Changed 6 years ago by emmons

  • Component changed from unknown to design

General consensus from the TC (1/4/12) is that we're probably better off not doing this, since it really applies only to Arabic and not to other locales in general. If you want to present a different proposal to the group then we'll be happy to look at it.

comment:4 Changed 6 years ago by mark

  • Milestone changed from UNSCH to postpone

comment:5 Changed 5 years ago by srl

  • Owner changed from somebody to anybody

comment:6 Changed 5 years ago by mark

There was some discussion on 2013/1/2:

  • if : is variable, it does not preclude using 2 characters.
  • stress that this is just for the short form

Waiting for John's feedback.

comment:7 Changed 5 years ago by emmons

  • Owner changed from anybody to emmons
  • Priority changed from assess to medium
  • Status changed from new to assigned
  • Milestone changed from postpone to 23dres

comment:8 Changed 5 years ago by emmons

More discussion on 1/23 - I think I have an idea that can handle this.

comment:9 Changed 5 years ago by emmons

  • Milestone changed from 23dres to 24dsub

Will require ICU work in 52 to support my idea ( if accepted ), moving to 24dsub.

comment:10 Changed 4 years ago by emmons

  • Milestone changed from 24dsub to 24dsub2

comment:11 Changed 4 years ago by emmons

  • Priority changed from medium to minor

comment:12 Changed 4 years ago by emmons

  • Milestone changed from 24dsub2 to 25dsub

comment:13 Changed 4 years ago by emmons

  • Milestone changed from 25dsub to 25M1

comment:14 Changed 4 years ago by emmons

  • Owner changed from emmons to anybody
  • Status changed from assigned to new
  • Milestone changed from 25M1 to 25rc

Not a priority for us at this time, if someone wants to pursue this, then go for it.

comment:15 Changed 4 years ago by mark

  • Owner changed from anybody to mark
  • Status changed from new to assigned

comment:16 Changed 4 years ago by mark

  • Milestone changed from 25rc to 26dsub

comment:17 Changed 3 years ago by mark

There's no description of the alternative idea, so reviving the proposal:

<timeSeparator>٫</timeSeparator>

I think the main concern was that some locales use different time separators between different fields. We would just document that if they are different, timeSeparator only applies to the hours/minutes separator. The only issue we'd have would then be if a locale

  1. supported different numbering systems, and
  2. had different time separators in the same string.

This is either nonexistent or rare. (— Il meglio è l’inimico del bene —)

comment:18 Changed 3 years ago by pedberg

I am OK with the formulation in comment:17

comment:19 Changed 3 years ago by mark

Added the structure. TODO: add an example Generator instance

comment:20 Changed 3 years ago by mark

Some questions came up:

Where should it be in the LDML structure.

I looked at this, and the problem is that the separator varies with the numberSystem, not with the calendar. So while it seems a bit odd, that may be the best place for it.

How it would be used?

If (and only if) it is different than ":" in the locale/numberSystem used to format a date/time pattern, then it is substituted for : when formatting.

In other words, it functions in that case like the "," in a number pattern, which is a variable whose value is replaced by the grouping separator for the language.

comment:21 Changed 3 years ago by mark

  • Status changed from assigned to reviewing
  • Review set to emmons

comment:22 Changed 3 years ago by emmons

  • Status changed from reviewing to closed
  • Resolution set to fixed

comment:23 Changed 3 years ago by markus

  • Phase set to dsub
  • Milestone changed from 26dsub to 26
View

Add a comment

Modify Ticket

Action
as closed
Next status will be 'new'
Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.