Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#14920 closed bug (fixed)

datepicker widget uses deprecated getYear() Method

Reported by: jhfrench Owned by: scottgonzalez
Priority: minor Milestone: 1.12.0
Component: ui.datepicker Version: 1.11.4
Keywords: Cc:
Blocked by: Blocking:

Description

According to Mozilla Developer Network :

(Date.prototype.getYear()) feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.

The getYear() method returns the year in the specified date according to local time. Because getYear() does not return full years ("year 2000 problem"), it is no longer used and has been replaced by the [getFullYear()| https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getFullYear] method.

FWIW, Mozilla shows full desktop and mobile support for getFullYear.

Change History (2)

comment:1 Changed 13 months ago by scottgonzalez

  • Owner set to scottgonzalez
  • Resolution set to fixed
  • Status changed from new to closed

In 8564641:

Datepicker: Use getFullYear() instead of deprecated getYear()

Fixes #14920
Closes gh-1678

comment:2 Changed 13 months ago by scottgonzalez

  • Keywords getYear getFullYear Date.prototype removed
  • Milestone changed from none to 1.12.0
  • Version changed from git to 1.11.4
Note: See TracTickets for help on using tickets.