Change the format of a date
===

I submit a date through a form such as below

    2012-07-24 17:50

but on the result page I want to change it's format and echo it to 

    Tuesday, 24 of July

How do I do this? Should I use PHP or JavaScript?