MomentJS - Seconde

Cette méthode obtiendra / définira les secondes. Il prend une entrée de 0 à 59; s'il est supérieur à la plage fournie, il s'ajoutera aux minutes.

Syntaxe

moment().second(Number);
moment().second();
moment().seconds(Number);
moment().seconds();

Exemple

var m = moment().second(); //gives current second
var d = moment().second(10); //sets the second to 10 as shown below

Production