[threeten-dev] Zone or Zoned DateTime

Xueming Shen xueming.shen at oracle.com
Tue Dec 4 11:53:41 PST 2012


Agreed. ZoneDateTime is better than ZonedDateTime, and do it in the
jdk8 threeten repository:-)

Let me try one more time on "ZoneId -> Zone" naming. Zone can be
defined/specified as an abstraction/identity/id of a "zone", not necessary
to explicitly to have the "id" in its name. It a lightweight abstraction,
immutable, similar to what we do for the Locale. I believe the name
"ZoneId" originally came from the idea of separating the "id" and the
"rules", put the "id" into the name may help. But it does not appear to
me too bad to name it "Zone", as the abstraction of the time zone, and
this thing has its "rule", we call it ZoneRules... Especially, now we have
ZoneOffset subclass ZoneId, it is a little hard(?) to explain a "offset" is
a subclass of a "id", but it's easy/natural to say ZoneOffset is a special
"Zone".  Personally I feel Zone fits well into the rest of the "zone" family.

-Sherman

On 12/04/2012 11:26 AM, Roger Riggs wrote:
> Hi,
>
> I would go with ZoneDateTime;  similar to OffsetDateTime the qualifier
> is a noun describing the extra data.
>
> But given the trouble I've had with patching files including renames across repositories,
> I'd wait until tomorrow to rename it in the Mercurial repository.
>
> Roger
>
>
> On 12/4/2012 1:23 PM, Stephen Colebourne wrote:
>> Views on this please.
>>
>> Should we stick with ZonedDateTime, or change to ZoneDateTime?
>>
>> It is one letter difference, and not much semantic difference. I'm so
>> used to Zoned that I don't really think about it, but if there are
>> lots of arguments for Zone then I might consider a change.
>>
>> Stephen
>



More information about the threeten-dev mailing list