-
Sub-task
-
Resolution: Fixed
-
P4
-
None
-
None
-
None
-
generic
-
generic
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
=> 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
- duplicates
-
JDK-8013337 Issues with Date.prototype's get, set functions
- Closed