summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorvarunkasyap <varunkasyap@hotmail.com>2025-11-22 17:54:05 +0530
committerJacob Walls <jacobtylerwalls@gmail.com>2025-12-17 10:19:05 -0500
commit0d8548e5831bc610102d5e4b8a2366f26818a28a (patch)
tree66afb67472c108cc8301716f2b1bd7037bc63af5 /docs
parent6cc1231285a20b11058143f8cb0a6b4b3999b23a (diff)
Fixed #36747 -- Parsed weeks from ISO 8601 format in parse_duration().
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/utils.txt9
-rw-r--r--docs/releases/6.1.txt3
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 69af23ad83..1c42784d13 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -147,6 +147,15 @@ The functions defined in this module share the following properties:
``P4DT1H15M20S`` which is equivalent to ``4 1:15:20``) or PostgreSQL's
day-time interval format (e.g. ``3 days 04:05:06``).
+ .. admonition:: Years and months not supported
+
+ ISO 8601 years (``Y``) and months (``M``) are unsupported as they
+ cannot be represented by :class:`~datetime.timedelta`.
+
+ .. versionchanged:: 6.1
+
+ ISO 8601 duration parsing now supports weeks (``PnW``).
+
``django.utils.decorators``
===========================
diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt
index a392b3d755..4036514984 100644
--- a/docs/releases/6.1.txt
+++ b/docs/releases/6.1.txt
@@ -321,7 +321,8 @@ URLs
Utilities
~~~~~~~~~
-* ...
+* :func:`~django.utils.dateparse.parse_duration` now supports ISO 8601
+ durations expressed in weeks (``PnW``).
Validators
~~~~~~~~~~