class TruncMonth(expression, output_field=None, tzinfo=None, **extra) [source]
kind = 'month'
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 DateField or DateTimeField.
Since DateFields don’t have a time component, only Trunc subclasses that deal with date-parts can be used with DateField:
>>> from datetime impo