You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
561 B
15 lines
561 B
1 month ago
|
'use strict';
|
||
|
var hasOwn = require('../internals/has-own-property');
|
||
|
var defineBuiltIn = require('../internals/define-built-in');
|
||
|
var dateToPrimitive = require('../internals/date-to-primitive');
|
||
|
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||
|
|
||
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
||
|
var DatePrototype = Date.prototype;
|
||
|
|
||
|
// `Date.prototype[@@toPrimitive]` method
|
||
|
// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
|
||
|
if (!hasOwn(DatePrototype, TO_PRIMITIVE)) {
|
||
|
defineBuiltIn(DatePrototype, TO_PRIMITIVE, dateToPrimitive);
|
||
|
}
|