clock and calendar sanity for javascript