• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Core Syntax > Date.getYear()

Date.getYear()

JavaScript 1.0+, ECMAScript 1.0+, JScript 1.0+ Nav2+, NES2+, IE 3+, Opera3+ Syntax

							date.getYear()

Description

The getYear() method returns the year portion of the Date object. Unfortunately, the year is represented as either a two-digit number or a four-digit number, depending on the browser version. For example, the year 1983 may be returned from the methods as 1983 or just 83. The getYear() method was depreciated in JavaScript 1.2 in favor of the getFullYear() method.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint