Javascript Date Object Extension to format date