Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function numdate(v/*:number*/)/*:Date*/ {
var date = SSF.parse_date_code(v);
var val = new Date();
if(date == null) throw new Error("Bad Date Code: " + v);
val.setUTCDate(date.d);
val.setUTCMonth(date.m-1);
val.setUTCFullYear(date.y);
val.setUTCHours(date.H);
val.setUTCMinutes(date.M);
val.setUTCSeconds(date.S);
return val;
}