Details

    • Sub-task
    • Resolution: Fixed
    • P4
    • 8
    • None
    • core-libs
    • None
    • b89
    • generic
    • generic
    • Verified

    Description

      new Date(NaN).setFullYear(NaN)
      => currently throws java.lang.NullPointerException

      new Date(0).setYear(70)
      => should return 0

      new Date(0).setYear(NaN)
      => should return NaN

      new Date(NaN).setYear(70)
      => should return the new time value

      new Date(NaN).getTimezoneOffset()
      => should return NaN

      Date.prototype.setTime.call({},{valueOf:function(){throw "err"}})
      => should throw a TypeError instead of "err"

      new Date(NaN).setMilliseconds({valueOf:function(){throw "err"}})
      => should throw "err"

      Same bug with the following functions:
      Date.prototype.setUTCMilliseconds
      Date.prototype.setSeconds
      Date.prototype.setUTCSeconds
      Date.prototype.setMinutes
      Date.prototype.setUTCMinutes
      Date.prototype.setHours
      Date.prototype.setUTCHours
      Date.prototype.setDate
      Date.prototype.setUTCDate
      Date.prototype.setMonth
      Date.prototype.setUTCMonth

      Attachments

        Issue Links

          Activity

            People

              sundar Sundararajan Athijegannathan
              sundar Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: