diff options
Diffstat (limited to 'docs/ref/models')
| -rw-r--r-- | docs/ref/models/database-functions.txt | 44 | ||||
| -rw-r--r-- | docs/ref/models/querysets.txt | 10 |
2 files changed, 13 insertions, 41 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 diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index e3ce38066e..4a1836ba14 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -837,7 +837,7 @@ Examples:: ``datetimes()`` ~~~~~~~~~~~~~~~ -.. method:: datetimes(field_name, kind, order='ASC', tzinfo=None, is_dst=None) +.. method:: datetimes(field_name, kind, order='ASC', tzinfo=None) Returns a ``QuerySet`` that evaluates to a list of :class:`datetime.datetime` objects representing all available dates of a particular kind within the @@ -859,14 +859,6 @@ object. If it's ``None``, Django uses the :ref:`current time zone <default-current-time-zone>`. It has no effect when :setting:`USE_TZ` is ``False``. -``is_dst`` 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. - -.. deprecated:: 4.0 - - The ``is_dst`` parameter is deprecated and will be removed in Django 5.0. - .. _database-time-zone-definitions: .. note:: |
