Description
When doing some updates on Boa recently, I noticed that there's an important difference between the property bag that is provided to from
and with
. Namely, with
ALWAYS uses the calendar of self
where partial
. We should update the Partials to account for this difference.
The question is how should this be represented?
My current thoughts is to create a new CalendarFields
struct and then PartialDate is updated to:
struct PartialDate {
calendar_fields: CalendarFields,
calendar: Calendar,
}
struct DateTimeFields {
calendar_fields: CalendarFields,
time: PartialTime,
}
struct PartialDateTime {
fields: DateTimeFields,
calendar: Calendar
}
struct ZonedDateTimeFields {
calendar_fields: CalendarFields,
time: PartialTime,
offset: Offset,
time_zone: TimeZone,
}
struct PartialZonedDateTime {
fields: ZonedDateTimeFields,
calendar: Calendar
}
This would mean that with
methods are then updated to accept a XFields struct while from_partial
accepts the PartialX.
Of course, this approach ultimately might cause more issues for how ZonedDateTime's from_partial
and with_with_provider
methods should handle the updates. I've attempted to roughly sketch out the impact of the fields above.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status