From 5c70299a712434c8f1b2156230634913c6a0c813 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Mon, 4 Feb 2013 15:06:38 -0500 Subject: [PATCH] Fixed #19734 -- Missing values in `DATETIME_INPUT_FORMATS` doc. Also changed formating of `DATE_INPUT_FORMATS` and `TIME_INPUT_FORMATS` for readability. Thanks minddust for the report! --- docs/ref/settings.txt | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index affa805bc4..d4c6868ced 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -636,9 +636,13 @@ DATE_INPUT_FORMATS Default:: - ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', - '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', - '%B %d, %Y', '%d %B %Y', '%d %B, %Y') + ( + '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06' + '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006' + '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006' + '%B %d %Y', '%B %d, %Y', # 'October 25 2006', 'October 25, 2006' + '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006' + ) A tuple of formats that will be accepted when inputting data on a date field. Formats will be tried in order, using the first valid one. Note that these @@ -673,9 +677,20 @@ DATETIME_INPUT_FORMATS Default:: - ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', - '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', - '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y') + ( + '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' + '%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' + '%Y-%m-%d %H:%M', # '2006-10-25 14:30' + '%Y-%m-%d', # '2006-10-25' + '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' + '%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200' + '%m/%d/%Y %H:%M', # '10/25/2006 14:30' + '%m/%d/%Y', # '10/25/2006' + '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' + '%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200' + '%m/%d/%y %H:%M', # '10/25/06 14:30' + '%m/%d/%y', # '10/25/06' + ) A tuple of formats that will be accepted when inputting data on a datetime field. Formats will be tried in order, using the first valid one. Note that @@ -1650,7 +1665,12 @@ See also :setting:`DATE_FORMAT` and :setting:`DATETIME_FORMAT`. TIME_INPUT_FORMATS ------------------ -Default: ``('%H:%M:%S', '%H:%M')`` +Default:: + + ( + '%H:%M:%S', # '14:30:59' + '%H:%M', # '14:30' + ) A tuple of formats that will be accepted when inputting data on a time field. Formats will be tried in order, using the first valid one. Note that these