mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #32365 -- Removed is_dst argument for various methods and functions.
Per deprecation timeline.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user