Closed cristallium closed 1 year ago
This code will result in an issue :
var d1:Date = new Date(); d1.hours = d1.minutes = d1.milliseconds = 0; trace ("d1->" + d1.getTime());
will output :
d1->NaN
should output a number JS generated is the following :
var /** @type {Date} */ d1 = new Date(); d1.setHours(d1.setMinutes(d1.setMilliseconds(0))); org.apache.royale.utils.Language.trace("d1->" + d1.getTime());
Workaround :
var d1:Date = new Date(); d1.hours = 0; d1.minutes = 0; d1.milliseconds = 0; trace ("d1->" + d1.getTime());
This code will result in an issue :
will output :
d1->NaN
should output a number JS generated is the following :
Workaround :