Makedate = function(day, time){ if (!IsFinite(day) || !IsFinite(time)) return NaN; return day * msPerDay + time;}