Da página de manual: -
DATE STRING
The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800"
or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar date,
time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the
beginning of the day. The date string format is more complex than is easily documented here but is fully
described in the info documentation.
Mas parece que não reconhece YYYY-MMM-DD
format. Então, você pode usar de baixo ou semelhante:
$ date -d "2015-07-13" +"%Y-%b-%d"
2015-Jul-13
$ date -d "Jul 13 2015" +"%Y-%b-%d"
2015-Jul-13
$ date -d "13 Jul 2015" +"%Y-%b-%d"
2015-Jul-13
OU você tem que converter / reformule antes de enviar para date
!
Veja também Como você especifica um formato para a entrada até a data?
Recomendo visitar: Formatos de entrada de dados .
Here are the rules.
For numeric months, the ISO 8601 format 'year-month-day' is allowed, where year is any positive number, month is a number between 01 and 12, and day is a number between 01 and 31. A leading zero must be present if a number is less than ten. If year is 68 or smaller, then 2000 is added to it; otherwise, if year is less than 100, then 1900 is added to it. The construct 'month/day/year', popular in the United States, is accepted. Also 'month/day', omitting the year.
Literal months may be spelled out in full: 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November' or 'December'. Literal months may be abbreviated to their first three letters, possibly followed by an abbreviating dot. It is also permitted to write 'Sept' instead of 'September'.
When months are written literally, the calendar date may be given as any of the following:
day month year
day month
month day year
day-month-year
enfatizado por mim
Aqui você pode ver que não há formato como ano-mês-dia ! (durante meses estão escritos literalmente)