-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Labels
C-calendarComponent: CalendarsComponent: Calendarsdiscuss-priorityDiscuss at the next ICU4X meetingDiscuss at the next ICU4X meeting
Milestone
Description
In 2.0, you can write:
let cal = Dangi::new();
Date::try_new_dangi_with_calendar(1, MonthCode::new_normal(1).unwrap(), 1, cal)
On main, you need to instead write:
let cal = LunarChinese::new_korea();
Date::try_new_chinese_with_calendar(1, MonthCode::new_normal(1).unwrap(), 1, cal)
I really struggle to see how this is an improvement. It's one fewer method, but the cost is that we have the word "chinese" twice and "korea" once even though we are constructing a Korean calendar. (Yes, this discussion is colored a bit by "calendar is a thing used by a group of people" versus "calendar is an algorithm")
How about we fix this issue and also change the constructor to take a string for the month code.
let cal = AsianLunar::new_korea();
Date::try_new_asian_lunar_with_calendar(1, "M01", 1, cal)
Metadata
Metadata
Assignees
Labels
C-calendarComponent: CalendarsComponent: Calendarsdiscuss-priorityDiscuss at the next ICU4X meetingDiscuss at the next ICU4X meeting