Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

variable dans fonction date

1 réponse
Avatar
titanlg
Bonjour =E0 tous,

Comment rempalcer 2007
par une variable qui prendrait succesivement
au fils du temps 2008,2009 etc ..

var jourj =3D new Date("Oct 21, 2007");

Merci d'avance.

Jean-Pol DAVID
www.colovid.be/kate.htm

1 réponse

Avatar
ASM
En réponse à titanlg qui écrivit, en date du : 1/09/07 17:40, le
message suivant :
Bonjour à tous,

Comment rempalcer 2007
par une variable qui prendrait succesivement
au fils du temps 2008,2009 etc ..

var jourj = new Date("Oct 21, 2007");


var an = 1981, jourj;
while(an<2025) {
jourj = new Date('Oct 21,'+an);
document.write(jourj + '<br>');
an++;
}

.