Open gazpachoking opened 5 months ago
Duration
only supports full months and years, hence floating-point multiplication is not supported.
@sdispater @Secrus I see two options here:
Duration
with years>0
and/or months>0
.__truediv__
https://github.com/sdispater/pendulum/blob/3e3fec6a5b66759078c5ae39c736ca95b78adbef/src/pendulum/duration.py#L431-L439
Issue
When doing math on
Duration
objects, months are ignored. This is because it uses the_to_microseconds
method which ignores themonths
attribute. https://github.com/sdispater/pendulum/blob/3e3fec6a5b66759078c5ae39c736ca95b78adbef/src/pendulum/duration.py#L356-L357 e.g. :