Converting Time module to JS.

**Description**

On our way to converting CoffeeScript code to JavaScript.

**Reviewers**
- @singingwolfboy