diff options
Diffstat (limited to 'django/utils/dateparse.py')
| -rw-r--r-- | django/utils/dateparse.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/dateparse.py b/django/utils/dateparse.py index 535655561c..0945c0c761 100644 --- a/django/utils/dateparse.py +++ b/django/utils/dateparse.py @@ -16,13 +16,13 @@ date_re = _lazy_re_compile( time_re = _lazy_re_compile( r'(?P<hour>\d{1,2}):(?P<minute>\d{1,2})' - r'(?::(?P<second>\d{1,2})(?:\.(?P<microsecond>\d{1,6})\d{0,6})?)?' + r'(?::(?P<second>\d{1,2})(?:[\.,](?P<microsecond>\d{1,6})\d{0,6})?)?' ) datetime_re = _lazy_re_compile( r'(?P<year>\d{4})-(?P<month>\d{1,2})-(?P<day>\d{1,2})' r'[T ](?P<hour>\d{1,2}):(?P<minute>\d{1,2})' - r'(?::(?P<second>\d{1,2})(?:\.(?P<microsecond>\d{1,6})\d{0,6})?)?' + r'(?::(?P<second>\d{1,2})(?:[\.,](?P<microsecond>\d{1,6})\d{0,6})?)?' r'(?P<tzinfo>Z|[+-]\d{2}(?::?\d{2})?)?$' ) @@ -33,7 +33,7 @@ standard_duration_re = _lazy_re_compile( r'((?:(?P<hours>\d+):)(?=\d+:\d+))?' r'(?:(?P<minutes>\d+):)?' r'(?P<seconds>\d+)' - r'(?:\.(?P<microseconds>\d{1,6})\d{0,6})?' + r'(?:[\.,](?P<microseconds>\d{1,6})\d{0,6})?' r'$' ) |
