Small nitpick, but its best to put each var declaration on a newline:

```javascript
var hour = ... ,
    ampm = ... ;
```