给定的起始日期/时间和持续时间,我怎样才能使服务器侧计算,其确定是否有物体"finished"
,"in progress"
或"upcoming"
--Show
--duration: "144"
--startDate: "2015-11-10"
--startTime: "14:00"
--status: "?"
客户端 javascript 来确定节目是否已经开始:
// if negative, then show hasn't started yet
var time = (-(startdate.getTime() - currentdate.getTime()) / 1000 / 60);
客户端 javascript 以确定节目是否已完成运行:
// if negative, then show has finished
var timeLeft = channelDuration - timerStartTime;