“Momentdatum hinzufügen” Code-Antworten

Momentdatum hinzufügen

var new_date = moment(startdate, "DD-MM-YYYY").add(5, 'days');
Attractive Addax

moment.add

var newDate = moment().add(1, 'hours').add(10,"m");
//years or y
//quarters or Q
//months or M
//weeks or w
//days or d
//hours or h
//minutes or m
//seconds	or s
//milliseconds or ms 
Sad Santa

So erstellen Sie Datumsobjekt mit spezifischer Zeit im Moment js

var date = "2017-03-13";
var time = "18:00";

var timeAndDate = moment(date + ' ' + time);

console.log(timeAndDate);
Powerful Pygmy

Ähnliche Antworten wie “Momentdatum hinzufügen”

Fragen ähnlich wie “Momentdatum hinzufügen”

Weitere verwandte Antworten zu “Momentdatum hinzufügen” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen