Is it possible to get formatted date string format in PHP?
For example,
Input: 2014-02-01
Output: Y-m-d
Input: February 1, 2014
Output: F j, Y
I understand that there will be problems with relative dates, such as tomorrowor 'next monday'. Thus, the input will be a complete date string in the format that is accepted strtotime.
source
share