main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
631 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var uncurryThis = require('../internals/function-uncurry-this');
|
---|
4 | var fails = require('../internals/fails');
|
---|
5 |
|
---|
6 | // IE8- non-standard case
|
---|
7 | var FORCED = fails(function () {
|
---|
8 | // eslint-disable-next-line es/no-date-prototype-getyear-setyear -- detection
|
---|
9 | return new Date(16e11).getYear() !== 120;
|
---|
10 | });
|
---|
11 |
|
---|
12 | var getFullYear = uncurryThis(Date.prototype.getFullYear);
|
---|
13 |
|
---|
14 | // `Date.prototype.getYear` method
|
---|
15 | // https://tc39.es/ecma262/#sec-date.prototype.getyear
|
---|
16 | $({ target: 'Date', proto: true, forced: FORCED }, {
|
---|
17 | getYear: function getYear() {
|
---|
18 | return getFullYear(this) - 1900;
|
---|
19 | }
|
---|
20 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.