source: trip-planner-front/node_modules/core-js/modules/es.date.to-string.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 614 bytes
Line 
1var redefine = require('../internals/redefine');
2
3var DatePrototype = Date.prototype;
4var INVALID_DATE = 'Invalid Date';
5var TO_STRING = 'toString';
6var nativeDateToString = DatePrototype[TO_STRING];
7var getTime = DatePrototype.getTime;
8
9// `Date.prototype.toString` method
10// https://tc39.es/ecma262/#sec-date.prototype.tostring
11if (String(new Date(NaN)) != INVALID_DATE) {
12 redefine(DatePrototype, TO_STRING, function toString() {
13 var value = getTime.call(this);
14 // eslint-disable-next-line no-self-compare -- NaN check
15 return value === value ? nativeDateToString.call(this) : INVALID_DATE;
16 });
17}
Note: See TracBrowser for help on using the repository browser.