Extension of the Javascript Date Object to format date