Skip to main content

Search and Top Navigation

#14920 closed bug (fixed)

Opened February 18, 2016 08:09PM UTC

Closed February 21, 2016 05:39PM UTC

Last modified February 21, 2016 05:39PM UTC

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.

Attachments (0)
Change History (2)

Changed February 21, 2016 05:39PM UTC by scottgonzalez comment:1

owner: → scottgonzalez
resolution: → fixed
status: newclosed

In [changeset:"8564641fb8dcff3f072106b075a1bdb1f16ec63d" 8564641]:

#!CommitTicketReference repository="" revision="8564641fb8dcff3f072106b075a1bdb1f16ec63d"
Datepicker: Use  instead of deprecated 

Fixes #14920
Closes gh-1678

Changed February 21, 2016 05:39PM UTC by scottgonzalez comment:2

keywords: getYear getFullYear Date.prototype
milestone: none1.12.0
version: git1.11.4