summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2013-02-04 15:23:37 -0500
committerSimon Charette <charette.s@gmail.com>2013-02-04 15:23:37 -0500
commitf58aae9311ade7a59ca97ec1e5dee7c08ab86f28 (patch)
tree8fc61ef0fd8ddde06e6532880f1999ee17cea416 /docs/ref
parent7a90c6adccb57eb27b363c9cffc759243e17ed1f (diff)
[1.5.x] 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! Backport of 5c70299a71 from master.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/settings.txt34
1 files changed, 27 insertions, 7 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 641fe2ac9c..81519af4ef 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -670,9 +670,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
@@ -707,9 +711,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
@@ -2022,7 +2037,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