fixed return value of function, added support for 24hour presentation
test harness works in chrome