I need to add the variable secondsToMinutes
to the startdate
.
secondsToMinutes
is "3:20"
startDate
= "2:00 PM"
endDate
should equal "2:03:20 PM".
I've tried a number of ways and get errors each and every time.
var startdate = data.StartTime;
startdate = moment(startdate).format('LTS');
var secondsToMinutes = readableDuration(self.runlength());//='3:20';
var seconds = secondsToMinutes.split(':')[1];
var minutes = secondsToMinutes.split(':')[0];
var date = moment(startdate)
.add(seconds, 'seconds')
.add(minutes, 'minutes')
.format('LTS');
Date shows up as invalid date.
moment.duration("3:20")
– Deneb