From 4338a93af92c205869f064a78adf22113bc890e1 Mon Sep 17 00:00:00 2001
From: Domenic Denicola
If ! IsBuiltinCalendar(calendarIdentifier) is false, then throw
- a "DataCloneError
" DOMException
DataCloneError
" DOMException
.
Set serialized to { [[Type]]: "Temporal.PlainDate", [[ISOYear]]: value.[[ISOYear]], [[ISOMonth]]: value.[[ISOMonth]], [[ISODay]]: @@ -8483,7 +8483,7 @@ interface DOMStringList { ToString(value.[[Calendar]]).
If ! IsBuiltinCalendar(calendarIdentifier) is false, then throw
- a "DataCloneError
" DOMException
DataCloneError
" DOMException
.
Set serialized to { [[Type]]: "Temporal.PlainDateTime", [[ISOYear]]: value.[[ISOYear]], [[ISOMonth]]: value.[[ISOMonth]], [[ISODay]]: @@ -8504,13 +8504,13 @@ interface DOMStringList { ToString(value.[[TimeZone]]).
If ! IsValidTimeZoneName(timeZoneIdentifier) is false, then
- throw a "DataCloneError
" DOMException
DataCloneError
" DOMException
.
Let calendarIdentifier be ? ToString(value.[[Calendar]]).
If ! IsBuiltinCalendar(calendarIdentifier) is false, then throw
- a "DataCloneError
" DOMException
DataCloneError
" DOMException
.
Set serialized to { [[Type]]: "Temporal.ZonedDateTime", [[Nanoseconds]]: value.[[Nanoseconds]], [[TimeZone]]: timeZoneIdentifier, [[Calendar]]: @@ -8552,7 +8552,7 @@ interface DOMStringList { ToString(value.[[Calendar]]).
If ! IsBuiltinCalendar(calendarIdentifier) is false, then throw
- a "DataCloneError
" DOMException
DataCloneError
" DOMException
.
Set serialized to { [[Type]]: "Temporal.PlainYearMonth", [[ISOYear]]: value.[[ISOYear]], [[ISOMonth]]: value.[[ISOMonth]], [[ISODay]]: @@ -8569,7 +8569,7 @@ interface DOMStringList { ToString(value.[[Calendar]]).
If ! IsBuiltinCalendar(calendarIdentifier) is false, then throw
- a "DataCloneError
" DOMException
DataCloneError
" DOMException
.
Set serialized to { [[Type]]: "Temporal.PlainMonthDay", [[ISOYear]]: value.[[ISOYear]], [[ISOMonth]]: value.[[ISOMonth]], [[ISODay]]: @@ -8585,7 +8585,7 @@ interface DOMStringList {
Let calendarIdentifier be ? ToString(value).
If ! IsBuiltinCalendar(calendarIdentifier) is false, then throw
- a "DataCloneError
" DOMException
DataCloneError
" DOMException
.
Set serialized to { [[Type]]: "Temporal.Calendar", [[Identifier]]: calendarIdentifier }.
Let timeZoneIdentifier be ? ToString(value).
If ! IsValidTimeZoneName(timeZoneIdentifier) is false, then
- throw a "DataCloneError
" DOMException
DataCloneError
" DOMException
.
Set serialized to { [[Type]]: "Temporal.TimeZone", [[Identifier]]: timeZoneIdentifier }.
Let calendar be ! GetBuiltinCalendar(serialized.[[Calendar]]).
Set value to ! Construct(%Temporal.PlainDate%, « - serialized.[[ISOYear]], serialized.[[ISOMonth]], +
Set value to ! Construct(%Temporal.PlainDate%, + « serialized.[[ISOYear]], serialized.[[ISOMonth]], serialized.[[ISODay]], calendar »).
Otherwise, if serialized.[[Type]] is "Temporal.PlainTime", then:
Set value to ! Construct(%Temporal.PlainTime%, « - serialized.[[ISOHour]], serialized.[[ISOMinute]], +
Set value to ! Construct(%Temporal.PlainTime%, + « serialized.[[ISOHour]], serialized.[[ISOMinute]], serialized.[[ISOSecond]], serialized.[[ISOMillisecond]], serialized.[[ISOMicrosecond]], serialized.[[ISONanosecond]] »).
Let calendar be ! GetBuiltinCalendar(serialized.[[Calendar]]).
Set value to ! Construct(%Temporal.PlainDateTime%, « - serialized.[[ISOYear]], serialized.[[ISOMonth]], +
Set value to ! Construct(%Temporal.PlainDateTime%, + « serialized.[[ISOYear]], serialized.[[ISOMonth]], serialized.[[ISODay]], serialized.[[ISOHour]], serialized.[[ISOMinute]], serialized.[[ISOSecond]], serialized.[[ISOMillisecond]], serialized.[[ISOMicrosecond]], @@ -9064,16 +9061,14 @@ o.myself = o;
Otherwise, if serialized.[[Type]] is "Temporal.ZonedDateTime", then:
Let timeZone be ! Construct(%Temporal.TimeZone%, « - serialized.[[TimeZone]] »).
Let timeZone be ! Construct(%Temporal.TimeZone%, + « serialized.[[TimeZone]] »).
Let calendar be ! GetBuiltinCalendar(serialized.[[Calendar]]).
Set value to ! Construct(%Temporal.ZonedDateTime%, « - serialized.[[Nanoseconds]], timeZone, calendar +
Set value to ! Construct(%Temporal.ZonedDateTime%, + « serialized.[[Nanoseconds]], timeZone, calendar »).
Otherwise, if serialized.[[Type]] is "Temporal.Duration", then:
Set value to ! Construct(%Temporal.Duration%, « serialized.[[Years]], - serialized.[[Months]], serialized.[[Weeks]], - serialized.[[Days]], serialized.[[Hours]], - serialized.[[Minutes]], serialized.[[Seconds]], - serialized.[[Milliseconds]], serialized.[[Microseconds]], - serialized.[[Nanoseconds]] »).
Set value to ! Construct(%Temporal.Duration%, + « serialized.[[Years]], serialized.[[Months]], + serialized.[[Weeks]], serialized.[[Days]], + serialized.[[Hours]], serialized.[[Minutes]], + serialized.[[Seconds]], serialized.[[Milliseconds]], + serialized.[[Microseconds]], serialized.[[Nanoseconds]] + »).
Otherwise, if serialized.[[Type]] is "Temporal.Instant", then:
Set value to ! Construct(%Temporal.Instant%, « - serialized.[[Nanoseconds]] »).
Set value to ! Construct(%Temporal.Instant%, + « serialized.[[Nanoseconds]] »).
Let calendar be ! GetBuiltinCalendar(serialized.[[Calendar]]).
Set value to ! Construct(%Temporal.PlainYearMonth%, « +
Set value to ! + Construct(%Temporal.PlainYearMonth%, « serialized.[[ISOYear]], serialized.[[ISOMonth]], calendar, serialized.[[ISODay]] »).
Let calendar be ! GetBuiltinCalendar(serialized.[[Calendar]]).
Set value to ! Construct(%Temporal.PlainMonthDay%, « - serialized.[[ISOMonth]], serialized.[[ISODay]], calendar, - serialized.[[ISOYear]] »).
Set value to ! Construct(%Temporal.PlainMonthDay%, + « serialized.[[ISOMonth]], serialized.[[ISODay]], + calendar, serialized.[[ISOYear]] »).
Otherwise, if serialized.[[Type]] is "Temporal.TimeZone", then:
Set value to ! Construct(%Temporal.TimeZone%, « - serialized.[[Identifier]] »).
Set value to ! Construct(%Temporal.TimeZone%, + « serialized.[[Identifier]] »).