use Moment for datetime manipulation in JavaScript

Change-Id: Ic3ef1bea64d196d82f76be6c7ad1b6f8f538df9c