i have the problem, that i get a wront time if i try to calculate it. Why? what did i wrong? it's not the biggest problem, because i can also substract -1 on each parts but its confusing me it would be cool to know why javascript calculate that as it did. oO thx
var listDaten = [
{
jahre: ['2000','2001'],
monate: ['12','9'], //12-09(so)
tage: ['28','2'], //248
}]
console.log("DatumA:" + new Date(2001,09,02) )
// wrong has to 02 sep 2001
console.log("DatumB:" + new Date(listDaten[0].jahre[1],listDaten[0].monate[1],listDaten[0].tage[1]) )
// wrong has to 02 sep 2001
console.log("DatumC:" + new Date(2000,12,28) )
// wrong has to 28 dec 2000
console.log("DatumD:" + new Date(listDaten[0].jahre[0],listDaten[0].monate[0],listDaten[0].tage[0]) )
// wrong has to 28 dec 2000