我有两个变量:
start = "14:00"
duration = "30" (minutes"
如何使用Jquery或Javascript计算时间?所以它看起来像14:00 + 30 = 14:30
答案 0 :(得分:0)
答案 1 :(得分:0)
您应该将所有值转换为秒,然后将它们设为HH:MM
start = "14:00" => 14*60*60 translates to seconds
duration = "30" = > 30*60 translates to seconds
var theDate = (new Date).clearTime().addSeconds(57600).toString('H:mm:ss');
:)