Is it possible to get the format of a formatted date string 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 problem with relative dates like tomorrow
or 'next monday'. So, input will be a complete date string in a format that is accepted by strtotime
.