summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-01-31 10:10:46 +0100
committerCarlton Gibson <carlton.gibson@noumenal.es>2022-02-01 15:14:17 +0100
commit0c06819caae202f1a7aa96d2da2affb2400fef10 (patch)
tree2ed88df7e45668c1253d876bc8da175e5b544384
parent1c74ac864861ef3dd33b27ea0e183ff1a35ea503 (diff)
downloaddjango-0c06819caae202f1a7aa96d2da2affb2400fef10.tar.gz
[4.0.x] Refs #33476 -- Used vertical hanging indentation for format lists with inline comments.
Lists with multiple values and comments per-line are reformatted by Black to multiple lines with a single comment. For example: DATE_INPUT_FORMATS = "%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y", # '2006-10-25', '10/25/2006', '10/25/06' ] is reformatted to the: DATE_INPUT_FORMATS = "%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y", # '2006-10-25', '10/25/2006', '10/25/06' ] This reformats affected entries to multiple lines with corresponding comments. Backport of ca88caa1031c0de545d82de8d90dcae0e03651fb from main
-rw-r--r--django/conf/global_settings.py16
-rw-r--r--django/conf/locale/ca/formats.py4
-rw-r--r--django/conf/locale/cs/formats.py9
-rw-r--r--django/conf/locale/cy/formats.py3
-rw-r--r--django/conf/locale/de/formats.py6
-rw-r--r--django/conf/locale/de_CH/formats.py6
-rw-r--r--django/conf/locale/el/formats.py4
-rw-r--r--django/conf/locale/en/formats.py16
-rw-r--r--django/conf/locale/en_AU/formats.py15
-rw-r--r--django/conf/locale/en_GB/formats.py15
-rw-r--r--django/conf/locale/es/formats.py4
-rw-r--r--django/conf/locale/es_CO/formats.py3
-rw-r--r--django/conf/locale/es_MX/formats.py3
-rw-r--r--django/conf/locale/es_NI/formats.py3
-rw-r--r--django/conf/locale/es_PR/formats.py4
-rw-r--r--django/conf/locale/fr/formats.py6
-rw-r--r--django/conf/locale/hr/formats.py6
-rw-r--r--django/conf/locale/id/formats.py9
-rw-r--r--django/conf/locale/it/formats.py9
-rw-r--r--django/conf/locale/ka/formats.py14
-rw-r--r--django/conf/locale/ko/formats.py16
-rw-r--r--django/conf/locale/lt/formats.py4
-rw-r--r--django/conf/locale/lv/formats.py4
-rw-r--r--django/conf/locale/mk/formats.py6
-rw-r--r--django/conf/locale/ml/formats.py16
-rw-r--r--django/conf/locale/ms/formats.py9
-rw-r--r--django/conf/locale/nb/formats.py13
-rw-r--r--django/conf/locale/nl/formats.py82
-rw-r--r--django/conf/locale/nn/formats.py13
-rw-r--r--django/conf/locale/pl/formats.py6
-rw-r--r--django/conf/locale/pt/formats.py10
-rw-r--r--django/conf/locale/pt_BR/formats.py9
-rw-r--r--django/conf/locale/sk/formats.py6
-rw-r--r--django/conf/locale/sl/formats.py6
-rw-r--r--django/conf/locale/sr/formats.py15
-rw-r--r--django/conf/locale/sr_Latn/formats.py15
-rw-r--r--django/conf/locale/tr/formats.py6
-rw-r--r--docs/ref/settings.txt16
38 files changed, 273 insertions, 134 deletions
diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py
index 769e7c99af..9958c51a77 100644
--- a/django/conf/global_settings.py
+++ b/django/conf/global_settings.py
@@ -365,11 +365,17 @@ SHORT_DATETIME_FORMAT = 'm/d/Y P'
# https://docs.python.org/library/datetime.html#strftime-behavior
# * Note that these format strings are different from the ones to display dates
DATE_INPUT_FORMATS = [
- '%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'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y', # '10/25/06'
+ '%b %d %Y', # 'Oct 25 2006'
+ '%b %d, %Y', # 'Oct 25, 2006'
+ '%d %b %Y', # '25 Oct 2006'
+ '%d %b, %Y', # '25 Oct, 2006'
+ '%B %d %Y', # 'October 25 2006'
+ '%B %d, %Y', # 'October 25, 2006'
+ '%d %B %Y', # '25 October 2006'
+ '%d %B, %Y', # '25 October, 2006'
]
# Default formats to be used when parsing times from input boxes, in order
diff --git a/django/conf/locale/ca/formats.py b/django/conf/locale/ca/formats.py
index 746d08fdd2..f6b2957d11 100644
--- a/django/conf/locale/ca/formats.py
+++ b/django/conf/locale/ca/formats.py
@@ -14,8 +14,8 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- # '31/12/2009', '31/12/09'
- '%d/%m/%Y', '%d/%m/%y'
+ '%d/%m/%Y', # '31/12/2009'
+ '%d/%m/%y', # '31/12/09'
]
DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
diff --git a/django/conf/locale/cs/formats.py b/django/conf/locale/cs/formats.py
index c01af8b7d7..5c6d8f9c0f 100644
--- a/django/conf/locale/cs/formats.py
+++ b/django/conf/locale/cs/formats.py
@@ -14,9 +14,12 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y', '%d.%m.%y', # '05.01.2006', '05.01.06'
- '%d. %m. %Y', '%d. %m. %y', # '5. 1. 2006', '5. 1. 06'
- # '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
+ '%d.%m.%Y', # '05.01.2006'
+ '%d.%m.%y', # '05.01.06'
+ '%d. %m. %Y', # '5. 1. 2006'
+ '%d. %m. %y', # '5. 1. 06'
+ # "%d. %B %Y", # '25. October 2006'
+ # "%d. %b. %Y", # '25. Oct. 2006'
]
# Kept ISO formats as one is in first position
TIME_INPUT_FORMATS = [
diff --git a/django/conf/locale/cy/formats.py b/django/conf/locale/cy/formats.py
index db40cabfa6..bcdcb111df 100644
--- a/django/conf/locale/cy/formats.py
+++ b/django/conf/locale/cy/formats.py
@@ -14,7 +14,8 @@ FIRST_DAY_OF_WEEK = 1 # 'Dydd Llun'
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/de/formats.py b/django/conf/locale/de/formats.py
index 7bd5e0582b..65d58b5f2b 100644
--- a/django/conf/locale/de/formats.py
+++ b/django/conf/locale/de/formats.py
@@ -14,8 +14,10 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
- # '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
+ # "%d. %B %Y", # '25. October 2006'
+ # "%d. %b. %Y", # '25. Oct. 2006'
]
DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
diff --git a/django/conf/locale/de_CH/formats.py b/django/conf/locale/de_CH/formats.py
index 59a9fcb0df..9ee69120c8 100644
--- a/django/conf/locale/de_CH/formats.py
+++ b/django/conf/locale/de_CH/formats.py
@@ -14,8 +14,10 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
- # '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
+ # "%d. %B %Y", # '25. October 2006'
+ # "%d. %b. %Y", # '25. Oct. 2006'
]
DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
diff --git a/django/conf/locale/el/formats.py b/django/conf/locale/el/formats.py
index 8d3175a72e..7aa53a0f1a 100644
--- a/django/conf/locale/el/formats.py
+++ b/django/conf/locale/el/formats.py
@@ -14,7 +14,9 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', '%Y-%m-%d', # '25/10/2006', '25/10/06', '2006-10-25',
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
+ '%Y-%m-%d', # '2006-10-25'
]
DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
diff --git a/django/conf/locale/en/formats.py b/django/conf/locale/en/formats.py
index f5af6509c6..884deff17e 100644
--- a/django/conf/locale/en/formats.py
+++ b/django/conf/locale/en/formats.py
@@ -27,11 +27,17 @@ FIRST_DAY_OF_WEEK = 0
# Note that these format strings are different from the ones to display dates.
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
- '%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'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y', # '10/25/06'
+ '%b %d %Y', # 'Oct 25 2006'
+ '%b %d, %Y', # 'Oct 25, 2006'
+ '%d %b %Y', # '25 Oct 2006'
+ '%d %b, %Y', # '25 Oct, 2006'
+ '%B %d %Y', # 'October 25 2006'
+ '%B %d, %Y', # 'October 25, 2006'
+ '%d %B %Y', # '25 October 2006'
+ '%d %B, %Y', # '25 October, 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/en_AU/formats.py b/django/conf/locale/en_AU/formats.py
index 310577cbd4..d6a3b7235d 100644
--- a/django/conf/locale/en_AU/formats.py
+++ b/django/conf/locale/en_AU/formats.py
@@ -14,11 +14,16 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/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'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
+ # "%b %d %Y", # 'Oct 25 2006'
+ # "%b %d, %Y", # 'Oct 25, 2006'
+ # "%d %b %Y", # '25 Oct 2006'
+ # "%d %b, %Y", # '25 Oct, 2006'
+ # "%B %d %Y", # 'October 25 2006'
+ # "%B %d, %Y", # 'October 25, 2006'
+ # "%d %B %Y", # '25 October 2006'
+ # "%d %B, %Y", # '25 October, 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/en_GB/formats.py b/django/conf/locale/en_GB/formats.py
index 8895179e90..84ab5a8a93 100644
--- a/django/conf/locale/en_GB/formats.py
+++ b/django/conf/locale/en_GB/formats.py
@@ -14,11 +14,16 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/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'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
+ # "%b %d %Y", # 'Oct 25 2006'
+ # "%b %d, %Y", # 'Oct 25, 2006'
+ # "%d %b %Y", # '25 Oct 2006'
+ # "%d %b, %Y", # '25 Oct, 2006'
+ # "%B %d %Y", # 'October 25 2006'
+ # "%B %d, %Y", # 'October 25, 2006'
+ # "%d %B %Y", # '25 October 2006'
+ # "%d %B, %Y", # '25 October, 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/es/formats.py b/django/conf/locale/es/formats.py
index b7aca78988..6b017df49a 100644
--- a/django/conf/locale/es/formats.py
+++ b/django/conf/locale/es/formats.py
@@ -14,8 +14,8 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- # '31/12/2009', '31/12/09'
- '%d/%m/%Y', '%d/%m/%y'
+ '%d/%m/%Y', # '31/12/2009'
+ '%d/%m/%y', # '31/12/09'
]
DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
diff --git a/django/conf/locale/es_CO/formats.py b/django/conf/locale/es_CO/formats.py
index cefbe26dae..d3a7a35d5c 100644
--- a/django/conf/locale/es_CO/formats.py
+++ b/django/conf/locale/es_CO/formats.py
@@ -9,7 +9,8 @@ SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
FIRST_DAY_OF_WEEK = 1
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
'%Y%m%d', # '20061025'
]
diff --git a/django/conf/locale/es_MX/formats.py b/django/conf/locale/es_MX/formats.py
index 760edcfa1c..d5b94e6e89 100644
--- a/django/conf/locale/es_MX/formats.py
+++ b/django/conf/locale/es_MX/formats.py
@@ -9,7 +9,8 @@ SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
'%Y%m%d', # '20061025'
]
DATETIME_INPUT_FORMATS = [
diff --git a/django/conf/locale/es_NI/formats.py b/django/conf/locale/es_NI/formats.py
index 2eacf506ee..ca17c9a998 100644
--- a/django/conf/locale/es_NI/formats.py
+++ b/django/conf/locale/es_NI/formats.py
@@ -9,7 +9,8 @@ SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
'%Y%m%d', # '20061025'
]
diff --git a/django/conf/locale/es_PR/formats.py b/django/conf/locale/es_PR/formats.py
index 7f53ef9fe2..8f95484f63 100644
--- a/django/conf/locale/es_PR/formats.py
+++ b/django/conf/locale/es_PR/formats.py
@@ -10,8 +10,8 @@ SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
FIRST_DAY_OF_WEEK = 0 # Sunday
DATE_INPUT_FORMATS = [
- # '31/12/2009', '31/12/09'
- '%d/%m/%Y', '%d/%m/%y'
+ '%d/%m/%Y', # '31/12/2009'
+ '%d/%m/%y', # '31/12/09'
]
DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
diff --git a/django/conf/locale/fr/formats.py b/django/conf/locale/fr/formats.py
index f24e77f3e1..a7c45598c8 100644
--- a/django/conf/locale/fr/formats.py
+++ b/django/conf/locale/fr/formats.py
@@ -14,8 +14,10 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
- '%d.%m.%Y', '%d.%m.%y', # Swiss [fr_CH), '25.10.2006', '25.10.06'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
+ '%d.%m.%Y', # Swiss [fr_CH] '25.10.2006'
+ '%d.%m.%y', # Swiss [fr_CH] '25.10.06'
# '%d %B %Y', '%d %b %Y', # '25 octobre 2006', '25 oct. 2006'
]
DATETIME_INPUT_FORMATS = [
diff --git a/django/conf/locale/hr/formats.py b/django/conf/locale/hr/formats.py
index 96ad19508e..627c39764f 100644
--- a/django/conf/locale/hr/formats.py
+++ b/django/conf/locale/hr/formats.py
@@ -16,8 +16,10 @@ FIRST_DAY_OF_WEEK = 1
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25'
- '%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
- '%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '25. 10. 06.'
+ '%d.%m.%Y.', # '25.10.2006.'
+ '%d.%m.%y.', # '25.10.06.'
+ '%d. %m. %Y.', # '25. 10. 2006.'
+ '%d. %m. %y.', # '25. 10. 06.'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/id/formats.py b/django/conf/locale/id/formats.py
index b1e08f19a3..a8cdc9589c 100644
--- a/django/conf/locale/id/formats.py
+++ b/django/conf/locale/id/formats.py
@@ -14,11 +14,14 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d-%m-%Y', '%d/%m/%Y', # '25-10-2009', 25/10/2009'
- '%d-%m-%y', '%d/%m/%y', # '25-10-09', 25/10/09'
+ '%d-%m-%Y', # '25-10-2009'
+ '%d/%m/%Y', # '25/10/2009'
+ '%d-%m-%y', # '25-10-09'
+ '%d/%m/%y', # '25/10/09'
'%d %b %Y', # '25 Oct 2006',
'%d %B %Y', # '25 October 2006'
- '%m/%d/%y', '%m/%d/%Y', # '10/25/06', '10/25/2009'
+ '%m/%d/%y', # '10/25/06'
+ '%m/%d/%Y', # '10/25/2009'
]
TIME_INPUT_FORMATS = [
diff --git a/django/conf/locale/it/formats.py b/django/conf/locale/it/formats.py
index 8562aefb77..703297af03 100644
--- a/django/conf/locale/it/formats.py
+++ b/django/conf/locale/it/formats.py
@@ -14,9 +14,12 @@ FIRST_DAY_OF_WEEK = 1 # Lunedì
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%Y/%m/%d', # '25/10/2006', '2008/10/25'
- '%d-%m-%Y', '%Y-%m-%d', # '25-10-2006', '2008-10-25'
- '%d-%m-%y', '%d/%m/%y', # '25-10-06', '25/10/06'
+ '%d/%m/%Y', # '25/10/2006'
+ '%Y/%m/%d', # '2006/10/25'
+ '%d-%m-%Y', # '25-10-2006'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d-%m-%y', # '25-10-06'
+ '%d/%m/%y', # '25/10/06'
]
DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
diff --git a/django/conf/locale/ka/formats.py b/django/conf/locale/ka/formats.py
index 86308e3521..bc75ac7407 100644
--- a/django/conf/locale/ka/formats.py
+++ b/django/conf/locale/ka/formats.py
@@ -15,10 +15,16 @@ FIRST_DAY_OF_WEEK = 1 # (Monday)
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
- '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
- '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
- # '%d %b %Y', '%d %b, %Y', '%d %b. %Y', # '25 Oct 2006', '25 Oct, 2006', '25 Oct. 2006'
- # '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y', # '10/25/06'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
+ # "%d %b %Y", # '25 Oct 2006'
+ # "%d %b, %Y", # '25 Oct, 2006'
+ # "%d %b. %Y", # '25 Oct. 2006'
+ # "%d %B %Y", # '25 October 2006'
+ # "%d %B, %Y", # '25 October, 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/ko/formats.py b/django/conf/locale/ko/formats.py
index 0e281e94c1..78f9f10f17 100644
--- a/django/conf/locale/ko/formats.py
+++ b/django/conf/locale/ko/formats.py
@@ -15,11 +15,17 @@ SHORT_DATETIME_FORMAT = 'Y-n-j H:i'
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
- '%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'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y', # '10/25/06'
+ # "%b %d %Y", # 'Oct 25 2006'
+ # "%b %d, %Y", # 'Oct 25, 2006'
+ # "%d %b %Y", # '25 Oct 2006'
+ # "%d %b, %Y", #'25 Oct, 2006'
+ # "%B %d %Y", # 'October 25 2006'
+ # "%B %d, %Y", #'October 25, 2006'
+ # "%d %B %Y", # '25 October 2006'
+ # "%d %B, %Y", # '25 October, 2006'
'%Y년 %m월 %d일', # '2006년 10월 25일', with localized suffix.
]
TIME_INPUT_FORMATS = [
diff --git a/django/conf/locale/lt/formats.py b/django/conf/locale/lt/formats.py
index 57631ffe97..94e4469057 100644
--- a/django/conf/locale/lt/formats.py
+++ b/django/conf/locale/lt/formats.py
@@ -14,7 +14,9 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
]
TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59'
diff --git a/django/conf/locale/lv/formats.py b/django/conf/locale/lv/formats.py
index bc5f3b2eb8..9fac516cc5 100644
--- a/django/conf/locale/lv/formats.py
+++ b/django/conf/locale/lv/formats.py
@@ -15,7 +15,9 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
- '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
]
TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59'
diff --git a/django/conf/locale/mk/formats.py b/django/conf/locale/mk/formats.py
index 18d478235a..12e506163d 100644
--- a/django/conf/locale/mk/formats.py
+++ b/django/conf/locale/mk/formats.py
@@ -14,8 +14,10 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
- '%d. %m. %Y', '%d. %m. %y', # '25. 10. 2006', '25. 10. 06'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
+ '%d. %m. %Y', # '25. 10. 2006'
+ '%d. %m. %y', # '25. 10. 06'
]
DATETIME_INPUT_FORMATS = [
diff --git a/django/conf/locale/ml/formats.py b/django/conf/locale/ml/formats.py
index ccace3d2b3..5f8b51d51d 100644
--- a/django/conf/locale/ml/formats.py
+++ b/django/conf/locale/ml/formats.py
@@ -15,11 +15,17 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
- '%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'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y', # '10/25/06'
+ # "%b %d %Y", # 'Oct 25 2006'
+ # "%b %d, %Y", # 'Oct 25, 2006'
+ # "%d %b %Y", # '25 Oct 2006'
+ # "%d %b, %Y", # '25 Oct, 2006'
+ # "%B %d %Y", # 'October 25 2006'
+ # "%B %d, %Y", # 'October 25, 2006'
+ # "%d %B %Y", # '25 October 2006'
+ # "%d %B, %Y", # '25 October, 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/ms/formats.py b/django/conf/locale/ms/formats.py
index 0ea90e0c40..8f46fdc144 100644
--- a/django/conf/locale/ms/formats.py
+++ b/django/conf/locale/ms/formats.py
@@ -15,9 +15,12 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25'
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
- '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006'
- '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
+ '%d %b %Y', # '25 Oct 2006'
+ '%d %b, %Y', # '25 Oct, 2006'
+ '%d %B %Y', # '25 October 2006'
+ '%d %B, %Y', # '25 October, 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/nb/formats.py b/django/conf/locale/nb/formats.py
index 91dd9e6bb7..c34cb778ea 100644
--- a/django/conf/locale/nb/formats.py
+++ b/django/conf/locale/nb/formats.py
@@ -15,10 +15,15 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
- '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
- # '%d. %b %Y', '%d %b %Y', # '25. okt 2006', '25 okt 2006'
- # '%d. %b. %Y', '%d %b. %Y', # '25. okt. 2006', '25 okt. 2006'
- # '%d. %B %Y', '%d %B %Y', # '25. oktober 2006', '25 oktober 2006'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
+ # "%d. %b %Y", # '25. okt 2006'
+ # "%d %b %Y", # '25 okt 2006'
+ # "%d. %b. %Y", # '25. okt. 2006'
+ # "%d %b. %Y", # '25 okt. 2006'
+ # "%d. %B %Y", # '25. oktober 2006'
+ # "%d %B %Y", # '25 oktober 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/nl/formats.py b/django/conf/locale/nl/formats.py
index afadb9f1d7..fbe937c3f4 100644
--- a/django/conf/locale/nl/formats.py
+++ b/django/conf/locale/nl/formats.py
@@ -14,11 +14,15 @@ FIRST_DAY_OF_WEEK = 1 # Monday (in Dutch 'maandag')
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d-%m-%Y', '%d-%m-%y', # '20-01-2009', '20-01-09'
- '%d/%m/%Y', '%d/%m/%y', # '20/01/2009', '20/01/09'
+ '%d-%m-%Y', # '20-01-2009'
+ '%d-%m-%y', # '20-01-09'
+ '%d/%m/%Y', # '20/01/2009'
+ '%d/%m/%y', # '20/01/09'
'%Y/%m/%d', # '2009/01/20'
- # '%d %b %Y', '%d %b %y', # '20 jan 2009', '20 jan 09'
- # '%d %B %Y', '%d %B %y', # '20 januari 2009', '20 januari 09'
+ # "%d %b %Y", # '20 jan 2009'
+ # "%d %b %y", # '20 jan 09'
+ # "%d %B %Y", # '20 januari 2009'
+ # "%d %B %y", # '20 januari 09'
]
# Kept ISO formats as one is in first position
TIME_INPUT_FORMATS = [
@@ -31,35 +35,57 @@ TIME_INPUT_FORMATS = [
]
DATETIME_INPUT_FORMATS = [
# With time in %H:%M:%S :
- '%d-%m-%Y %H:%M:%S', '%d-%m-%y %H:%M:%S', '%Y-%m-%d %H:%M:%S',
- # '20-01-2009 15:23:35', '20-01-09 15:23:35', '2009-01-20 15:23:35'
- '%d/%m/%Y %H:%M:%S', '%d/%m/%y %H:%M:%S', '%Y/%m/%d %H:%M:%S',
- # '20/01/2009 15:23:35', '20/01/09 15:23:35', '2009/01/20 15:23:35'
- # '%d %b %Y %H:%M:%S', '%d %b %y %H:%M:%S', # '20 jan 2009 15:23:35', '20 jan 09 15:23:35'
- # '%d %B %Y %H:%M:%S', '%d %B %y %H:%M:%S', # '20 januari 2009 15:23:35', '20 januari 2009 15:23:35'
+ '%d-%m-%Y %H:%M:%S', # '20-01-2009 15:23:35'
+ '%d-%m-%y %H:%M:%S', # '20-01-09 15:23:35'
+ '%Y-%m-%d %H:%M:%S', # '2009-01-20 15:23:35'
+ '%d/%m/%Y %H:%M:%S', # '20/01/2009 15:23:35'
+ '%d/%m/%y %H:%M:%S', # '20/01/09 15:23:35'
+ '%Y/%m/%d %H:%M:%S', # '2009/01/20 15:23:35'
+ # "%d %b %Y %H:%M:%S", # '20 jan 2009 15:23:35'
+ # "%d %b %y %H:%M:%S", # '20 jan 09 15:23:35'
+ # "%d %B %Y %H:%M:%S", # '20 januari 2009 15:23:35'
+ # "%d %B %y %H:%M:%S", # '20 januari 2009 15:23:35'
# With time in %H:%M:%S.%f :
- '%d-%m-%Y %H:%M:%S.%f', '%d-%m-%y %H:%M:%S.%f', '%Y-%m-%d %H:%M:%S.%f',
- # '20-01-2009 15:23:35.000200', '20-01-09 15:23:35.000200', '2009-01-20 15:23:35.000200'
- '%d/%m/%Y %H:%M:%S.%f', '%d/%m/%y %H:%M:%S.%f', '%Y/%m/%d %H:%M:%S.%f',
- # '20/01/2009 15:23:35.000200', '20/01/09 15:23:35.000200', '2009/01/20 15:23:35.000200'
+ '%d-%m-%Y %H:%M:%S.%f', # '20-01-2009 15:23:35.000200'
+ '%d-%m-%y %H:%M:%S.%f', # '20-01-09 15:23:35.000200'
+ '%Y-%m-%d %H:%M:%S.%f', # '2009-01-20 15:23:35.000200'
+ '%d/%m/%Y %H:%M:%S.%f', # '20/01/2009 15:23:35.000200'
+ '%d/%m/%y %H:%M:%S.%f', # '20/01/09 15:23:35.000200'
+ '%Y/%m/%d %H:%M:%S.%f', # '2009/01/20 15:23:35.000200'
# With time in %H.%M:%S :
- '%d-%m-%Y %H.%M:%S', '%d-%m-%y %H.%M:%S', # '20-01-2009 15.23:35', '20-01-09 15.23:35'
- '%d/%m/%Y %H.%M:%S', '%d/%m/%y %H.%M:%S', # '20/01/2009 15.23:35', '20/01/09 15.23:35'
- # '%d %b %Y %H.%M:%S', '%d %b %y %H.%M:%S', # '20 jan 2009 15.23:35', '20 jan 09 15.23:35'
- # '%d %B %Y %H.%M:%S', '%d %B %y %H.%M:%S', # '20 januari 2009 15.23:35', '20 januari 2009 15.23:35'
+ '%d-%m-%Y %H.%M:%S', # '20-01-2009 15.23:35'
+ '%d-%m-%y %H.%M:%S', # '20-01-09 15.23:35'
+ '%d/%m/%Y %H.%M:%S', # '20/01/2009 15.23:35'
+ '%d/%m/%y %H.%M:%S', # '20/01/09 15.23:35'
+ # "%d %b %Y %H.%M:%S", # '20 jan 2009 15.23:35'
+ # "%d %b %y %H.%M:%S", # '20 jan 09 15.23:35'
+ # "%d %B %Y %H.%M:%S", # '20 januari 2009 15.23:35'
+ # "%d %B %y %H.%M:%S", # '20 januari 2009 15.23:35'
# With time in %H.%M:%S.%f :
- '%d-%m-%Y %H.%M:%S.%f', '%d-%m-%y %H.%M:%S.%f', # '20-01-2009 15.23:35.000200', '20-01-09 15.23:35.000200'
- '%d/%m/%Y %H.%M:%S.%f', '%d/%m/%y %H.%M:%S.%f', # '20/01/2009 15.23:35.000200', '20/01/09 15.23:35.000200'
+ '%d-%m-%Y %H.%M:%S.%f', # '20-01-2009 15.23:35.000200'
+ '%d-%m-%y %H.%M:%S.%f', # '20-01-09 15.23:35.000200'
+ '%d/%m/%Y %H.%M:%S.%f', # '20/01/2009 15.23:35.000200'
+ '%d/%m/%y %H.%M:%S.%f', # '20/01/09 15.23:35.000200'
# With time in %H:%M :
- '%d-%m-%Y %H:%M', '%d-%m-%y %H:%M', '%Y-%m-%d %H:%M', # '20-01-2009 15:23', '20-01-09 15:23', '2009-01-20 15:23'
- '%d/%m/%Y %H:%M', '%d/%m/%y %H:%M', '%Y/%m/%d %H:%M', # '20/01/2009 15:23', '20/01/09 15:23', '2009/01/20 15:23'
- # '%d %b %Y %H:%M', '%d %b %y %H:%M', # '20 jan 2009 15:23', '20 jan 09 15:23'
- # '%d %B %Y %H:%M', '%d %B %y %H:%M', # '20 januari 2009 15:23', '20 januari 2009 15:23'
+ '%d-%m-%Y %H:%M', # '20-01-2009 15:23'
+ '%d-%m-%y %H:%M', # '20-01-09 15:23'
+ '%Y-%m-%d %H:%M', # '2009-01-20 15:23'
+ '%d/%m/%Y %H:%M', # '20/01/2009 15:23'
+ '%d/%m/%y %H:%M', # '20/01/09 15:23'
+ '%Y/%m/%d %H:%M', # '2009/01/20 15:23'
+ # "%d %b %Y %H:%M", # '20 jan 2009 15:23'
+ # "%d %b %y %H:%M", # '20 jan 09 15:23'
+ # "%d %B %Y %H:%M", # '20 januari 2009 15:23'
+ # "%d %B %y %H:%M", # '20 januari 2009 15:23'
# With time in %H.%M :
- '%d-%m-%Y %H.%M', '%d-%m-%y %H.%M', # '20-01-2009 15.23', '20-01-09 15.23'
- '%d/%m/%Y %H.%M', '%d/%m/%y %H.%M', # '20/01/2009 15.23', '20/01/09 15.23'
- # '%d %b %Y %H.%M', '%d %b %y %H.%M', # '20 jan 2009 15.23', '20 jan 09 15.23'
- # '%d %B %Y %H.%M', '%d %B %y %H.%M', # '20 januari 2009 15.23', '20 januari 2009 15.23'
+ '%d-%m-%Y %H.%M', # '20-01-2009 15.23'
+ '%d-%m-%y %H.%M', # '20-01-09 15.23'
+ '%d/%m/%Y %H.%M', # '20/01/2009 15.23'
+ '%d/%m/%y %H.%M', # '20/01/09 15.23'
+ # "%d %b %Y %H.%M", # '20 jan 2009 15.23'
+ # "%d %b %y %H.%M", # '20 jan 09 15.23'
+ # "%d %B %Y %H.%M", # '20 januari 2009 15.23'
+ # "%d %B %y %H.%M", # '20 januari 2009 15.23'
]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
diff --git a/django/conf/locale/nn/formats.py b/django/conf/locale/nn/formats.py
index 91dd9e6bb7..c34cb778ea 100644
--- a/django/conf/locale/nn/formats.py
+++ b/django/conf/locale/nn/formats.py
@@ -15,10 +15,15 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
- '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
- # '%d. %b %Y', '%d %b %Y', # '25. okt 2006', '25 okt 2006'
- # '%d. %b. %Y', '%d %b. %Y', # '25. okt. 2006', '25 okt. 2006'
- # '%d. %B %Y', '%d %B %Y', # '25. oktober 2006', '25 oktober 2006'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
+ # "%d. %b %Y", # '25. okt 2006'
+ # "%d %b %Y", # '25 okt 2006'
+ # "%d. %b. %Y", # '25. okt. 2006'
+ # "%d %b. %Y", # '25 okt. 2006'
+ # "%d. %B %Y", # '25. oktober 2006'
+ # "%d %B %Y", # '25 oktober 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/pl/formats.py b/django/conf/locale/pl/formats.py
index e666544747..7c9e30ad1f 100644
--- a/django/conf/locale/pl/formats.py
+++ b/django/conf/locale/pl/formats.py
@@ -14,9 +14,11 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
'%y-%m-%d', # '06-10-25'
- # '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
+ # "%d. %B %Y", # '25. października 2006'
+ # "%d. %b. %Y", # '25. paź. 2006'
]
DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
diff --git a/django/conf/locale/pt/formats.py b/django/conf/locale/pt/formats.py
index b0fbbad903..39e06c7002 100644
--- a/django/conf/locale/pt/formats.py
+++ b/django/conf/locale/pt/formats.py
@@ -15,9 +15,13 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [
- '%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06'
- # '%d de %b de %Y', '%d de %b, %Y', # '25 de Out de 2006', '25 Out, 2006'
- # '%d de %B de %Y', '%d de %B, %Y', # '25 de Outubro de 2006', '25 de Outubro, 2006'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
+ # "%d de %b de %Y", # '25 de Out de 2006'
+ # "%d de %b, %Y", # '25 Out, 2006'
+ # "%d de %B de %Y", # '25 de Outubro de 2006'
+ # "%d de %B, %Y", # '25 de Outubro, 2006'
]
DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
diff --git a/django/conf/locale/pt_BR/formats.py b/django/conf/locale/pt_BR/formats.py
index ed0c09fc7b..9f3244955d 100644
--- a/django/conf/locale/pt_BR/formats.py
+++ b/django/conf/locale/pt_BR/formats.py
@@ -14,9 +14,12 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
- # '%d de %b de %Y', '%d de %b, %Y', # '25 de Out de 2006', '25 Out, 2006'
- # '%d de %B de %Y', '%d de %B, %Y', # '25 de Outubro de 2006', '25 de Outubro, 2006'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
+ # "%d de %b de %Y", # '24 de Out de 2006'
+ # "%d de %b, %Y", # '25 Out, 2006'
+ # "%d de %B de %Y", # '25 de Outubro de 2006'
+ # "%d de %B, %Y", # '25 de Outubro, 2006'
]
DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
diff --git a/django/conf/locale/sk/formats.py b/django/conf/locale/sk/formats.py
index 20526419f8..56e710dd44 100644
--- a/django/conf/locale/sk/formats.py
+++ b/django/conf/locale/sk/formats.py
@@ -14,9 +14,11 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
'%y-%m-%d', # '06-10-25'
- # '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
+ # "%d. %B %Y", # '25. October 2006'
+ # "%d. %b. %Y", # '25. Oct. 2006'
]
DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
diff --git a/django/conf/locale/sl/formats.py b/django/conf/locale/sl/formats.py
index 35de5adfac..ab6d46d9f1 100644
--- a/django/conf/locale/sl/formats.py
+++ b/django/conf/locale/sl/formats.py
@@ -14,9 +14,11 @@ FIRST_DAY_OF_WEEK = 0
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
+ '%d.%m.%Y', # '25.10.2006'
+ '%d.%m.%y', # '25.10.06'
'%d-%m-%Y', # '25-10-2006'
- '%d. %m. %Y', '%d. %m. %y', # '25. 10. 2006', '25. 10. 06'
+ '%d. %m. %Y', # '25. 10. 2006'
+ '%d. %m. %y', # '25. 10. 06'
]
DATETIME_INPUT_FORMATS = [
diff --git a/django/conf/locale/sr/formats.py b/django/conf/locale/sr/formats.py
index 937a409257..624571cd95 100644
--- a/django/conf/locale/sr/formats.py
+++ b/django/conf/locale/sr/formats.py
@@ -14,11 +14,16 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
- '%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '25. 10. 06.'
- # '%d. %b %y.', '%d. %B %y.', # '25. Oct 06.', '25. October 06.'
- # '%d. %b \'%y.', '%d. %B \'%y.', # '25. Oct '06.', '25. October '06.'
- # '%d. %b %Y.', '%d. %B %Y.', # '25. Oct 2006.', '25. October 2006.'
+ '%d.%m.%Y.', # '25.10.2006.'
+ '%d.%m.%y.', # '25.10.06.'
+ '%d. %m. %Y.', # '25. 10. 2006.'
+ '%d. %m. %y.', # '25. 10. 06.'
+ # "%d. %b %y.", # '25. Oct 06.'
+ # "%d. %B %y.", # '25. October 06.'
+ # "%d. %b '%y.", # '25. Oct '06.'
+ # "%d. %B '%y.", # '25. October '06.'
+ # "%d. %b %Y.", # '25. Oct 2006.'
+ # "%d. %B %Y.", # '25. October 2006.'
]
DATETIME_INPUT_FORMATS = [
'%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59'
diff --git a/django/conf/locale/sr_Latn/formats.py b/django/conf/locale/sr_Latn/formats.py
index 937a409257..5c28783825 100644
--- a/django/conf/locale/sr_Latn/formats.py
+++ b/django/conf/locale/sr_Latn/formats.py
@@ -14,11 +14,16 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
- '%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '25. 10. 06.'
- # '%d. %b %y.', '%d. %B %y.', # '25. Oct 06.', '25. October 06.'
- # '%d. %b \'%y.', '%d. %B \'%y.', # '25. Oct '06.', '25. October '06.'
- # '%d. %b %Y.', '%d. %B %Y.', # '25. Oct 2006.', '25. October 2006.'
+ '%d.%m.%Y.', # '25.10.2006.'
+ '%d.%m.%y.', # '25.10.06.'
+ '%d. %m. %Y.', # '25. 10. 2006.'
+ '%d. %m. %y.', # '25. 10. 06.'
+ # "%d. %b %y.", # '25. Oct 06.'
+ # "%d. %B %y.", # '25. October 06.'
+ # "%d. %b '%y.", # '25. Oct '06.'
+ # "%d. %B '%y.", #'25. October '06.'
+ # "%d. %b %Y.", # '25. Oct 2006.'
+ # "%d. %B %Y.", # '25. October 2006.'
]
DATETIME_INPUT_FORMATS = [
'%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59'
diff --git a/django/conf/locale/tr/formats.py b/django/conf/locale/tr/formats.py
index 1be5ac51af..74bdab729b 100644
--- a/django/conf/locale/tr/formats.py
+++ b/django/conf/locale/tr/formats.py
@@ -14,9 +14,11 @@ FIRST_DAY_OF_WEEK = 1 # Pazartesi
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
+ '%d/%m/%Y', # '25/10/2006'
+ '%d/%m/%y', # '25/10/06'
'%y-%m-%d', # '06-10-25'
- # '%d %B %Y', '%d %b. %Y', # '25 Ekim 2006', '25 Eki. 2006'
+ # "%d %B %Y", # '25 Ekim 2006'
+ # "%d %b. %Y", # '25 Eki. 2006'
]
DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 02699ac04e..850aa0df21 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -1111,11 +1111,17 @@ See also :setting:`DATETIME_FORMAT`, :setting:`TIME_FORMAT` and :setting:`SHORT_
Default::
[
- '%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'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y', # '10/25/06'
+ '%b %d %Y', # 'Oct 25 2006'
+ '%b %d, %Y', # 'Oct 25, 2006'
+ '%d %b %Y', # '25 Oct 2006'
+ '%d %b, %Y', # '25 Oct, 2006'
+ '%B %d %Y', # 'October 25 2006'
+ '%B %d, %Y', # 'October 25, 2006'
+ '%d %B %Y', # '25 October 2006'
+ '%d %B, %Y', # '25 October, 2006'
]
A list of formats that will be accepted when inputting data on a date field.