Date object doesn't have .format() method.
If you work with date and time actively I'd recommend you to use MomentJS library then.
It has a lot of useful functionality to work with time and date.
For example: moment('July 24 2013', 'MMMM D YYYY').format('MMMM D YYYY, h:mm:ss a');