Given the start time / date and duration, how can I do a server-side calculation that determines if the object is "finished" , "in progress" or "upcoming"
--Show --duration: "144" --startDate: "2015-11-10" --startTime: "14:00" --status: "?"
Client-side javascript to determine if a show has started yet:
// if negative, then show hasn't started yet var time = (-(startdate.getTime() - currentdate.getTime()) / 1000 / 60);
Client-side javascript to determine if a show has ended yet:
// if negative, then show has finished var timeLeft = channelDuration - timerStartTime;
javascript firebase
Onichan
source share