For example:
var data:Date = new Date();
trace(data.month); //Supondo que o mês seja Janeiro: 0
I'd like some details as I know it's not just in ActionScript and Javascript that this happens. Why not simplify the month counter so that in a conversion it is easy to understand, getting the numbers returned exactly like the months of the year (January = 1, February = 2, March = 3)?
Because we always have to decrease 1:
var dataStr:String = "28/04/2014";
var data:Date = new Date(dataStr.substr(6,4), (dataStr.substr(3,2)-1), dataStr.substr(0,2), 0, 0, 0);
trace(data.month); //3
Why does this happen?