A Django model field to store dateutil.relativedelta.relativedelta.
The field is a subclass of JSONField and simply stores the kwargs of a relativedelta instance.
The field is mainly meant to store relativedelta.
The package django-relativedelta provides better query support
(for relative units since it uses a sql INTERVAL
).
The basic arguments for relative and absolute units are supported (year
, years
… microseconds
).
Currently not supported are: weekday
, leapdays
, yearday
& nlyearday
The package also provides a form field to edit the value of RelativeDeltaStoreField
with a custom
serialization format (configurable): 1hour +1days -1seconds