与PHP函数date()相反的是什么?

Is there any function in PHP that either takes a date and turns it into a time stamp, or can simply take a date in one format and change it into another format? I have a set of dates in the format 'm d', which I want to change to 'l, F d, Y'.

I will need this with dates in other formats as well, so a function that lets me give it a date, input format and output format.

DateTime::createFromFormat

Returns new DateTime object formatted according to the specified format

For output in a new format you have

DateTime::format

Or for a timestamp

DateTime::getTimestamp

use strtotime() and put it back in the date function like this:

date("l, F d, Y",strtotime($YOUR_MD_DATE));

Regards,
Dennis M.