Running Elapsed Time in Javascript

var startTime = new Date("1/29/2014 11:27 AM");
function UpdateStopWatch() {
    var endTime = new Date();
   var elapsedMilliSeconds = (endTime.getTime() - startTime.getTime());
   var elapsedSeconds = Math.floor(elapsedMilliSeconds / 1000);
   var elapsedMinutes = Math.floor(elapsedSeconds / 60);
   elapsedSeconds = elapsedSeconds - (elapsedMinutes * 60);
   var elapsedHours = Math.floor(elapsedMinutes / 60);
   elapsedMinutes = elapsedMinutes - (elapsedHours * 60);
   var outputMinutes = "0" + elapsedMinutes.toString();
   outputMinutes = outputMinutes.substr(outputMinutes.length - 2, 2);
   var outputSeconds = "0" + elapsedSeconds.toString();
   outputSeconds = outputSeconds.substr(outputSeconds.length - 2, 2);
   $("#myStopWatch").text(elapsedHours.toString() + ":" + outputMinutes + ":" + outputSeconds);
   window.setTimeout("UpdateStopWatch()", 1000);
}
UpdateStopWatch();

Regular Expression Cheatsheet

\d    numeric character [0-9]
\D    NOT a numeric character [^0-9]
\w    “word” character [a-zA-Z0-9_]
\W    NOT a “word” character [^a-zA-Z0-9_]
\s    whitespace character [\f\n\r\t\v]
\S    NOT a whitespace character [^\f\n\r\t\v]
.    Any character except a line break [^\n]
()    group
?    zero or one
*    zero to many
+    one to many
{x}    match x times
{x,y}    match x to y times

Reference: Regular Expressions: Not as Tricky as They May Seem