change Date.js to Moment.js

Date.js is an ugly framework. It's not compatible with d3.js.
The implementation of Moment.js is more elegant.