a scala port of moment.js