cherry-picking MikkoH's time stuff
merging in more of MikkoH's Time stuff
merging more MikkoH Time functions
fixing whitespace for jshint; updating build