Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an Ideal Components Bag / Skeleton for DateTimeFormat #1317

Open
7 tasks
Tracked by #272
gregtatum opened this issue Nov 18, 2021 · 16 comments
Open
7 tasks
Tracked by #272

Create an Ideal Components Bag / Skeleton for DateTimeFormat #1317

gregtatum opened this issue Nov 18, 2021 · 16 comments
Assignees
Labels
C-datetime Component: datetime, calendars, time zones help wanted Issue needs an assignee S-epic Size: Major project (create smaller child issues) T-core Type: Required functionality

Comments

@gregtatum
Copy link
Member

gregtatum commented Nov 18, 2021

This is a meta issue to track implementing the "ideal components bag" as laid out in the DateTimeFormat Deep Dive 2021-10-01 design document. Originally there was some discussion to have this replace the current components bag, but it is to be implemented alongside the existing components bag. A better name can be bikeshed if needed.

The following need to be completed.

@sffc
Copy link
Member

sffc commented Jan 27, 2022

@gregtatum will provide mentorship.

@zbraniecki
Copy link
Member

I'm spreading the word about this issue looking for candidates.

More details:

Description: Currently, DateTimeFormat has two ways to select the right format, both of them are imperfect. We believe we have a balanced novel solution that, once implemented, will become the foundational use of the DateTimeFormat.
Scope: We believe that the initial implementation should take one person several (2-3) months to implement. Hopefully in time for ICU4X 1.0.
Mentorship: This project is well staffed on the mentorship side with @gregtatum from Mozilla, @sffc from Google and @zbraniecki from Amazon willing to invest time to mentor the engineer who'll pick it.
How to start: If you are interested in the project, comment in this issue or join unicode-org.slack.com #icu4x and we'll get you on-ramped.

@ozghimire
Copy link
Contributor

ozghimire commented Feb 10, 2022

I'm interested to work on this issue.

@zbraniecki
Copy link
Member

@gregtatum are you still open to mentor?

@pdogr
Copy link
Contributor

pdogr commented Feb 11, 2022

If this issue is still open, I'm definitely interested to work on this.

@gregtatum
Copy link
Member Author

@ozghimire Great! How would you prefer to get started? There is a document linked above outlining the strategy which should discuss how to get things going. I would suggest starting with #1318. I will fill in more details on that issue.

@pdogr I think ozghimire is taking the first step on this to move it forward, and it's hard to parallelize this initial step, but there will probably be work to help out on around the issues. You could take another DateTimeFormat issue to get onboarded. I'm sure there will be opportunities to help in the short term. #1581 would be a good bug to onboard with if you wanted to take it.

@randomicon00
Copy link

Hello @gregtatum, are still looking for contributors?

@sffc sffc added discuss Discuss at a future ICU4X-SC meeting and removed v1 labels Apr 1, 2022
@sffc
Copy link
Member

sffc commented Aug 9, 2024

Working on the combined date/time pattern overrides.

All classical skeleta across all locales and calendars in CLDR (as a comma-separated list):

Bh,Bhm,Bhms,d,E,EBhm,EBhms,Ed,Ehm,Ehm-alt-ascii,EHm,Ehms,Ehms-alt-ascii,EHms,Gy,GyMd,GyMMM,GyMMMd,GyMMMEd,h,h-alt-ascii,H,hm,hm-alt-ascii,Hm,hms,hms-alt-ascii,Hms,hmsv,hmsv-alt-ascii,Hmsv,hmv,hmv-alt-ascii,Hmv,M,Md,MEd,MMM,MMMd,MMMEd,MMMMd,MMMMW-count-one,MMMMW-count-other,ms,y,yM,yMd,yMEd,yMMM,yMMMd,yMMMEd,yMMMM,yQQQ,yQQQQ,yw-count-one,yw-count-other,MMMMEd,MMdd,MMMMW-count-zero,MMMMW-count-two,MMMMW-count-few,MMMMW-count-many,yMM,yw-count-zero,yw-count-two,yw-count-few,yw-count-many,GyMMMM,GyMMMMd,GyMMMMEd,MMMM,MMMMdd,yMMMMd,yMMMMEd,MMd,hmsvvvv,Hmsvvvv,hmvvvv,Hmvvvv,yQ,yMMdd,GyMMMEEEEd,MMMEEEEd,MMMMEEEEd,yMMMEEEEd,yMMMMEEEEd,Md-alt-variant,MEd-alt-variant,MMdd-alt-variant,yMd-alt-variant,yMEd-alt-variant,MMMdd,mmss,HHmmZ,yMMMMccccd,EEEEd,MEEEEd,yMEEEEd,HHmmss,Mdd,Hmm,HHmm,GyM,yyyy,yyyyM,yyyyMd,yyyyMEd,yyyyMMM,yyyyMMMd,yyyyMMMEd,yyyyMMMM,yyyyQQQ,yyyyQQQQ,yyyyMMMMd,yyyyMMMMEd,yyyyMM,yyyyMMMEEEEd,yyyyMMMMEEEEd,yyyyMd-alt-variant,yyyyMEd-alt-variant,yyyyMMMMccccd,yyyyMMdd,yyyyMEEEEd,GyMEEEEd,UM,UMd,UMMM,UMMMd,UMd-alt-variant,HmZ

Of those, the ones that span date/time/zone are:

EBhm
EBhms
Ehm
EHm
Ehms
EHms
hmsv
Hmsv
hmv
Hmv
hmsvvvv
Hmsvvvv
hmvvvv
Hmvvvv
HHmmZ
HmZ

In order to keep a fixed set of auxiliary keys known at compile time, I will proceed to hard-code and generate those sets. I will store them only when they differ from the glue-based pattern. I will also open an issue to add a test that will inform us if any more such skeleta get added in the future.

sffc added a commit that referenced this issue Aug 9, 2024
robertbastian pushed a commit that referenced this issue Aug 15, 2024
sffc added a commit that referenced this issue Aug 22, 2024
…FieldLength variants (#5392)

#1317

This makes it such that adding or removing fractional second digits
involves changing one FieldSymbol, rather than going and mutating the
choice of fields in the pattern. Simpler and less error-prone at
runtime.

The parsing of "ss.SSS" is moved into the parser, where it belongs,
rather than handling it at format time.
sffc added a commit that referenced this issue Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-datetime Component: datetime, calendars, time zones help wanted Issue needs an assignee S-epic Size: Major project (create smaller child issues) T-core Type: Required functionality
Projects
None yet
Development

No branches or pull requests

10 participants