function getDate() { d = new Date(); return d.getFullYear() + "-" + ("0" + Number(d.getMonth()+1)).slice(-2)+"-"+ d.getDate() + "T" + GUI.getDisplayTime() + ":" + ("0" + d.getSeconds()).slice(-2); }
function time() { var timePattern = new RegExp('(\\d+):(\\d+)((am|pm)*)','g'); GUI.getDisplayTime().match(timePattern);
var hour = parseInt(RegExp.$1,10); var minute = parseInt(RegExp.$2,10);
if (hour === 3 && minute === 55) {CF.widget("A4","B","C").executeActions();}
var ampm = RegExp.$3; var seconds = new Date().getSeconds(); } //removed per reasons in previous post //time();
/* schedule periodic updates for when the TSU sits in the charging dock and it is powered on. */ function periodicUpdate_2(activity) { System.setDebugMask(9); System.print(getDate() + " [ScheduleAfter]_____TIMER"); time(); activity.scheduleAfter(updateInterval, periodicUpdate_2, activity); } // Kick off new timer for the current activity. periodicUpdate_2(CF.activity());