File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11from collections import OrderedDict
22from decimal import Decimal , InvalidOperation
33
4- import arrow # type: ignore
4+ import arrow
55
66from isoduration .parser .exceptions import (
77 IncorrectDesignator ,
@@ -28,14 +28,14 @@ def parse_datetime_duration(duration_str: str, sign: int) -> Duration:
2828
2929 return Duration (
3030 DateDuration (
31- years = sign * duration .year ,
32- months = sign * duration .month ,
33- days = sign * duration .day ,
31+ years = Decimal ( sign * duration .year ) ,
32+ months = Decimal ( sign * duration .month ) ,
33+ days = Decimal ( sign * duration .day ) ,
3434 ),
3535 TimeDuration (
36- hours = sign * duration .hour ,
37- minutes = sign * duration .minute ,
38- seconds = sign * duration .second ,
36+ hours = Decimal ( sign * duration .hour ) ,
37+ minutes = Decimal ( sign * duration .minute ) ,
38+ seconds = Decimal ( sign * duration .second ) ,
3939 ),
4040 )
4141
You can’t perform that action at this time.
0 commit comments