Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
452 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | 'use strict';
|
---|
| 2 | var $ = require('../internals/export');
|
---|
| 3 | var fails = require('../internals/fails');
|
---|
| 4 |
|
---|
| 5 | var FORCED = fails(function () {
|
---|
| 6 | return new Date(16e11).getYear() !== 120;
|
---|
| 7 | });
|
---|
| 8 |
|
---|
| 9 | var getFullYear = Date.prototype.getFullYear;
|
---|
| 10 |
|
---|
| 11 | // `Date.prototype.getYear` method
|
---|
| 12 | // https://tc39.es/ecma262/#sec-date.prototype.getyear
|
---|
| 13 | $({ target: 'Date', proto: true, forced: FORCED }, {
|
---|
| 14 | getYear: function getYear() {
|
---|
| 15 | return getFullYear.call(this) - 1900;
|
---|
| 16 | }
|
---|
| 17 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.