Minor fix in the doc

If I run the example as is I get:
```
TypeError: Cannot call method 'getTime' of undefined
```
Merge pull request #5 from grigio/master

Minor fix to the example in the doc