tefra/xsdata

XmlDuration def to_timedelta

skinkie opened this issue · 2 comments

Would be nice to have a to_timedelta, it probably looks easier than it is since XmlDuration has Years and Months as property too.

python timedeltas don't support years, months, if they were we wouldn't have to add our custom XmlDuration 😭

python timedeltas don't support years, months, if they were we wouldn't have to add our custom XmlDuration 😭

Is that also the reason it doesn't have a to_totalseconds because you cannot truthfully compute the seconds without knowing what year it is?