How should LocalDateTime
expose its Absolute, TimeZone, Calendar, and (calculated) DateTime?
#742
Labels
zoned-type
Part of the effort for a type with timestamp+timezone
How should
LocalDateTIme
store and expose theAbsolute
,TimeZone
,Calendar
, and (calculated)DateTime
instances that logically make up eachLocalDateTime
instance?There are four basic questions:
.foo
or.toFoo()
? The former is preferred as it's better ergonomics and aligns withgetFields()
,from
, andwith
which acceptabsolute
,calendar
, andtimeZone
properties (and maybedateTime
too, per Easier way to combine multiple Temporal objects in onefrom
orwith
call ? #720).DateTime
, given thatDateTime
can be a calculated value? Note that if we do store aDateTime
instance, then we won't need to store aCalendar
too, because we can just delegate the calendar storage and retrieval to theDateTime
instance.Some answers above imply other answers. For example, if a
.foo
syntax is used then the answer to (2) is "store objects" because we'd want to retain===
identity across calls to the same property.Answering these questions is probably dependent on @ptomato's research on how to handle the
calendar
property ofDate
,DateTime
, etc. which brings up many of the same issues.The text was updated successfully, but these errors were encountered: