Replacing the old date api for the momentjs API

Hi there!

I have replaced almost all the calls to the old date API by the new API.

= )