Skip to content

Consider naming of nested types in icu::datetime #2512

Open
@sffc

Description

@sffc

Feedback from @markusicu:

In the example in resolve_components, the expected_components_bag fields are year, month, day, but it might make more readable to be year_style, month_length, etc., because the RHS values are not the numeric values for the year, month, & day, but rather styles. And maybe the type names should not just be “Year”, but “YearStyle”, etc., so that when you import the types (structs, enums, etc.) into your code, you don’t get misleading code from the POV of a new user.

It’s strange that time_zone::IsoMinutes is an enum rather than a number type. More often, we have called such a thing a “-Style”.

For datetime::fields::*, I would rename “Day” to “DayType” or “DayField”

The structs in datetime::input::* are actually what they say they are, so they wouldn’t need a rename

@zbraniecki

Metadata

Metadata

Assignees

Labels

A-designArea: Architecture or designC-datetimeComponent: datetime, calendars, time zonesS-smallSize: One afternoon (small bug fix or enhancement)T-docs-testsType: Code change outside core library

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions