Announcement

Collapse
No announcement yet.

bug: d.getYear() faulty (10.2.1391)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bug: d.getYear() faulty (10.2.1391)

    "getYear(): returns a two digit representation of the year in the date object " (efs help file)

    PHP Code:
    debugPrint("d.getYear()=<"+d.getYear()+">, type = " + (typeof d.getYear() ) + "\n"); 
    (where d = new Date())

    prints "d.getYear()=<108>, type = number"


    d.getFullYear() works OK

  • #2
    Re: bug: d.getYear() faulty (10.2.1391)

    Dave180
    Regardless of what is indicated in this article in the EFS KnowledgeBase [which is not incorrect albeit incomplete] this is not a bug.
    The getYear() method of the Date Object will return a three digit number if the year is greater than 2000 (eg 108 for 2008). For more information on this you may want to review this article in the Core JavaScript Guide which is included in the EFS KnowledgeBase
    Alex


    Originally posted by Dave180
    "getYear(): returns a two digit representation of the year in the date object " (efs help file)

    PHP Code:
    debugPrint("d.getYear()=<"+d.getYear()+">, type = " + (typeof d.getYear() ) + "\n"); 
    (where d = new Date())

    prints "d.getYear()=<108>, type = number"


    d.getFullYear() works OK

    Comment

    Working...
    X