diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-09 09:52:26 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-17 11:49:15 +0100 |
| commit | 2fad1632571af551d6065d7eced93ffe93a8a945 (patch) | |
| tree | b926abed87ff568f36f42c18758a6cb56711f2a0 /docs/ref/models/database-functions.txt | |
| parent | e6f82438d4e3750e8d299bfd79dac98eebe9f1e0 (diff) | |
Refs #32365 -- Removed is_dst argument for various methods and functions.
Per deprecation timeline.
Diffstat (limited to 'docs/ref/models/database-functions.txt')
| -rw-r--r-- | docs/ref/models/database-functions.txt | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt index 71c98fd73e..78239be2f5 100644 --- a/docs/ref/models/database-functions.txt +++ b/docs/ref/models/database-functions.txt @@ -503,7 +503,7 @@ Usage example:: ``Trunc`` --------- -.. class:: Trunc(expression, kind, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: Trunc(expression, kind, output_field=None, tzinfo=None, **extra) Truncates a date up to a significant component. @@ -521,14 +521,6 @@ value. If ``output_field`` is omitted, it will default to the ``output_field`` of ``expression``. A ``tzinfo`` subclass, usually provided by :mod:`zoneinfo`, can be passed to truncate a value in a specific timezone. -.. deprecated:: 4.0 - - The ``is_dst`` parameter indicates whether or not ``pytz`` should interpret - nonexistent and ambiguous datetimes in daylight saving time. By default - (when ``is_dst=None``), ``pytz`` raises an exception for such datetimes. - - The ``is_dst`` parameter is deprecated and will be removed in Django 5.0. - Given the datetime ``2015-06-15 14:30:50.000321+00:00``, the built-in ``kind``\s return: @@ -594,28 +586,24 @@ Usage example:: ``DateField`` truncation ~~~~~~~~~~~~~~~~~~~~~~~~ -.. class:: TruncYear(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncYear(expression, output_field=None, tzinfo=None, **extra) .. attribute:: kind = 'year' -.. class:: TruncMonth(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncMonth(expression, output_field=None, tzinfo=None, **extra) .. attribute:: kind = 'month' -.. class:: TruncWeek(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncWeek(expression, output_field=None, tzinfo=None, **extra) Truncates to midnight on the Monday of the week. .. attribute:: kind = 'week' -.. class:: TruncQuarter(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncQuarter(expression, output_field=None, tzinfo=None, **extra) .. attribute:: kind = 'quarter' -.. deprecated:: 4.0 - - The ``is_dst`` parameter is deprecated and will be removed in Django 5.0. - These are logically equivalent to ``Trunc('date_field', kind)``. They truncate all parts of the date up to ``kind`` which allows grouping or filtering dates with less precision. ``expression`` can have an ``output_field`` of either @@ -675,26 +663,22 @@ truncate function. It's also registered as a transform on ``DateTimeField`` as truncate function. It's also registered as a transform on ``DateTimeField`` as ``__time``. -.. class:: TruncDay(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncDay(expression, output_field=None, tzinfo=None, **extra) .. attribute:: kind = 'day' -.. class:: TruncHour(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncHour(expression, output_field=None, tzinfo=None, **extra) .. attribute:: kind = 'hour' -.. class:: TruncMinute(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncMinute(expression, output_field=None, tzinfo=None, **extra) .. attribute:: kind = 'minute' -.. class:: TruncSecond(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncSecond(expression, output_field=None, tzinfo=None, **extra) .. attribute:: kind = 'second' -.. deprecated:: 4.0 - - The ``is_dst`` parameter is deprecated and will be removed in Django 5.0. - These are logically equivalent to ``Trunc('datetime_field', kind)``. They truncate all parts of the date up to ``kind`` and allow grouping or filtering datetimes with less precision. ``expression`` must have an ``output_field`` of @@ -728,25 +712,21 @@ Usage example:: ``TimeField`` truncation ~~~~~~~~~~~~~~~~~~~~~~~~ -.. class:: TruncHour(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncHour(expression, output_field=None, tzinfo=None, **extra) :noindex: .. attribute:: kind = 'hour' -.. class:: TruncMinute(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncMinute(expression, output_field=None, tzinfo=None, **extra) :noindex: .. attribute:: kind = 'minute' -.. class:: TruncSecond(expression, output_field=None, tzinfo=None, is_dst=None, **extra) +.. class:: TruncSecond(expression, output_field=None, tzinfo=None, **extra) :noindex: .. attribute:: kind = 'second' -.. deprecated:: 4.0 - - The ``is_dst`` parameter is deprecated and will be removed in Django 5.0. - These are logically equivalent to ``Trunc('time_field', kind)``. They truncate all parts of the time up to ``kind`` which allows grouping or filtering times with less precision. ``expression`` can have an ``output_field`` of either |
