You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each DateTime instance has an associated time zone in its zone field. There is a method setZone for changing the zone (in a clone). But there is no "official" way to read that Zone object because DateTime.zone is marked as @access private. Accordingly, the TypeScript type definitions at DefinitelyTyped don't include this member.
Is there a reason for not allowing access to this time zone?
The text was updated successfully, but these errors were encountered:
Yeah, per the other ticket, that's the unsupported way you could accomplish creating an IANA zone by name. It's private just because I didn't see a compelling need, and the smaller the interface, the less chance of bugs or misunderstandings, and the more I can change things without breaking people's code. So what I would need to change it is a compelling use case for making it public.
Each
DateTime
instance has an associated time zone in itszone
field. There is a methodsetZone
for changing the zone (in a clone). But there is no "official" way to read thatZone
object becauseDateTime.zone
is marked as@access private
. Accordingly, the TypeScript type definitions at DefinitelyTyped don't include this member.Is there a reason for not allowing access to this time zone?
The text was updated successfully, but these errors were encountered: