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!
This commit is contained in:
parent
40260bc30b
commit
5c70299a71
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue