| arg-coercion-order.js |
---
esid: sec-date.prototype.setdate
description: Order of coercion of provided argument vs NaN check
info: |
1. Let t be ? thisTimeValue(this value).
2. Let dt be ? ToNumber(date).
3. If t is NaN, return NaN.
4. Set t to LocalTime(t).
5. Let newDate be MakeDate(MakeDay(YearFromTime(t), MonthFromTime(t), dt), TimeWithinDay(t)).
6. Let u be TimeClip(UTC(newDate)).
7. Set the [[DateValue]] internal slot of this Date object to u.
8. Return u.
--- |
1029 |
| arg-to-number-err.js |
---
esid: sec-date.prototype.setdate
description: Abrupt completion during type coercion of provided argument
info: |
1. Let t be LocalTime(? thisTimeValue(this value)).
2. Let dt be ? ToNumber(date).
--- |
624 |
| arg-to-number.js |
---
esid: sec-date.prototype.setdate
description: Type coercion of provided argument
info: |
1. Let t be LocalTime(? thisTimeValue(this value)).
2. Let dt be ? ToNumber(date).
3. Let newDate be MakeDate(MakeDay(YearFromTime(t), MonthFromTime(t), dt),
TimeWithinDay(t)).
4. Let u be TimeClip(UTC(newDate)).
5. Set the [[DateValue]] internal slot of this Date object to u.
6. Return u.
--- |
1612 |
| browser.js |
|
0 |
| date-value-read-before-tonumber-when-date-is-invalid.js |
---
esid: sec-date.prototype.setdate
description: >
Read [[DateValue]] and then call ToNumber when stored time-value is invalid.
info: |
Date.prototype.setDate ( date )
...
3. Let t be dateObject.[[DateValue]].
4. Let dt be ? ToNumber(date).
5. If t is NaN, return NaN.
...
--- |
802 |
| date-value-read-before-tonumber-when-date-is-valid.js |
---
esid: sec-date.prototype.setdate
description: >
Read [[DateValue]] and then call ToNumber when stored time-value is valid.
info: |
Date.prototype.setDate ( date )
...
3. Let t be dateObject.[[DateValue]].
4. Let dt be ? ToNumber(date).
5. If t is NaN, return NaN.
6. Set t to LocalTime(t).
...
--- |
911 |
| length.js |
---
esid: sec-date.prototype.setdate
description: >
Date.prototype.setDate.length is 1.
info: |
Date.prototype.setDate ( date )
17 ECMAScript Standard Built-in Objects:
Every built-in function object, including constructors, has a "length"
property whose value is a non-negative integral Number. Unless otherwise
specified, this value is the number of required parameters shown in the
subclause heading for the function description. Optional parameters and rest
parameters are not included in the parameter count.
Unless otherwise specified, the "length" property of a built-in function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
--- |
1046 |
| name.js |
---
esid: sec-date.prototype.setdate
description: >
Date.prototype.setDate.name is "setDate".
info: |
Date.prototype.setDate ( date )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
--- |
864 |
| new-value-time-clip.js |
---
esid: sec-date.prototype.setdate
description: Behavior when new value exceeds [[DateValue]] limits
info: |
1. Let t be LocalTime(? thisTimeValue(this value)).
2. Let dt be ? ToNumber(date).
3. Let newDate be MakeDate(MakeDay(YearFromTime(t), MonthFromTime(t), dt),
TimeWithinDay(t)).
4. Let u be TimeClip(UTC(newDate)).
5. Set the [[DateValue]] internal slot of this Date object to u.
6. Return u.
TimeClip (time)
1. If time is not finite, return NaN.
2. If abs(time) > 8.64 × 1015, return NaN.
--- |
854 |
| not-a-constructor.js |
---
esid: sec-ecmascript-standard-built-in-objects
description: >
Date.prototype.setDate does not implement [[Construct]], is not new-able
info: |
ECMAScript Function Objects
Built-in function objects that are not identified as constructors do not
implement the [[Construct]] internal method unless otherwise specified in
the description of a particular function.
sec-evaluatenew
...
7. If IsConstructor(constructor) is false, throw a TypeError exception.
...
includes: [isConstructor.js]
features: [Reflect.construct, arrow-function]
--- |
941 |
| prop-desc.js |
---
esid: sec-date.prototype.setdate
description: >
Property descriptor for Date.prototype.setDate.
info: |
Date.prototype.setDate ( date )
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 19 through 28 and in
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
--- |
696 |
| shell.js |
|
0 |
| this-value-invalid-date.js |
---
esid: sec-date.prototype.setdate
description: >
Behavior when the "this" value is a Date object describing an invald date
info: |
1. Let t be LocalTime(? thisTimeValue(this value)).
2. Let dt be ? ToNumber(date).
3. Let newDate be MakeDate(MakeDay(YearFromTime(t), MonthFromTime(t), dt),
TimeWithinDay(t)).
4. Let u be TimeClip(UTC(newDate)).
5. Set the [[DateValue]] internal slot of this Date object to u.
6. Return u.
--- |
796 |
| this-value-non-date.js |
---
esid: sec-date.prototype.setdate
description: >
Behavior when "this" value is an Object without a [[DateValue]] internal slot
info: |
1. Let t be LocalTime(? thisTimeValue(this value)).
The abstract operation thisTimeValue(value) performs the following steps:
1. If Type(value) is Object and value has a [[DateValue]] internal slot, then
a. Return value.[[DateValue]].
2. Throw a TypeError exception.
--- |
1169 |
| this-value-non-object.js |
---
esid: sec-date.prototype.setdate
description: Behavior when "this" value is not an Object
info: |
1. Let t be LocalTime(? thisTimeValue(this value)).
The abstract operation thisTimeValue(value) performs the following steps:
1. If Type(value) is Object and value has a [[DateValue]] internal slot, then
a. Return value.[[DateValue]].
2. Throw a TypeError exception.
features: [Symbol]
--- |
1331 |
| this-value-valid-date.js |
---
esid: sec-date.prototype.setdate
description: Return value for valid dates
info: |
1. Let t be LocalTime(? thisTimeValue(this value)).
2. Let dt be ? ToNumber(date).
3. Let newDate be MakeDate(MakeDay(YearFromTime(t), MonthFromTime(t), dt),
TimeWithinDay(t)).
4. Let u be TimeClip(UTC(newDate)).
5. Set the [[DateValue]] internal slot of this Date object to u.
6. Return u.
--- |
1400 |