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.
strtotime: github.com/php/php-src/blob/master/ext/date/php_date.c01/02/03? I think the best you can do is prepare a bunch of regexen of expected input with maps to output, e.g./^\d{4}-\d{2}-\d{2}$/→ 'Y-m-d'.