For simple formats its easy to come up with equivalents
PHP:
date("Y-m-d") === "2012-07-25";
Python:
date.strftime("%Y-%m-%d") == "2012-07-25"
But what is the Python equivalent of
date("jS F Y") === "25th July 2012";
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m afraid I think you’ll have to work the suffix out yourself:
It’s a bit English-centric for a programming language feature, so you can see why they didn’t include it.
*Edited to add the “rd” suffix for 3rd and 23rd.