Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[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 5c70299 from master.
  • Loading branch information...
commit f58aae9311ade7a59ca97ec1e5dee7c08ab86f28 1 parent 7a90c6a
@charettes charettes authored
Showing with 27 additions and 7 deletions.
  1. +27 −7 docs/ref/settings.txt
View
34 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
Please sign in to comment.
Something went wrong with that request. Please try again.