I thought I would share these with anyone who is interested. Big thank you to Bruce for giving me a few clues. Also, thanks to Steve Parker for sharing some of his date/time methods with me (converted to JavaScript). I am no JS expert so feel free to modify or fix as needed.
function getClarionTime(clariontime) {
var d = new Date(),
clariontime = parseInt((d.getTime() - d.setHours(0,0,0,0)) / 10)
return clariontime;
}
function getClarionDate(clariondate) {
thisdate = new Date();
day = thisdate.getDay();
month = thisdate.getMonth()+1;
year = thisdate.getYear();
date = Date(year,month,day);
clariondate = parseInt(((Date.parse(date) / 86400) / 1000) + 61730);
return clariondate;
}
function createStarDate(date,time,stardate) {
//needs to be Clarion Date/Time
stardate = date + (time / 8640000)
return stardate;
}
function createRbnFromDateTime(date,time,rbn) {
//needs to be Clarion Date/Time
rbn = parseInt(time + (date * 8640000))
return rbn;
}
Don