activity.utils
Attributes
Functions
|
|
|
|
|
|
|
Merges the given list of ranges into a list of ranges including only |
|
|
|
|
|
|
|
|
|
Creates an xml for import through ISO20022. Used for testing only. |
|
Returns true if any time tuple in the list of tuples in a overlaps |
|
|
|
|
|
Module Contents
- activity.utils.overlaps(range_a: RangeLike[SupportsRichComparisonT], range_b: RangeLike[SupportsRichComparisonT]) bool [source]
- activity.utils.merge_ranges(ranges: Iterable[RangeTuple[SupportsRichComparisonT]]) list[RangeTuple[SupportsRichComparisonT]] [source]
Merges the given list of ranges into a list of ranges including only exclusive ranges. The ranges are turned into tuples to make them hashable.
- activity.utils.generate_xml(payments: Iterable[dict[str, Any]]) str [source]
Creates an xml for import through ISO20022. Used for testing only.
- activity.utils.dates_overlap(a: Iterable[RangeTuple[datetime]], b: Iterable[RangeTuple[datetime]], minutes_between: float = 0, cut_end: bool = True, alignment: Literal['day', 'week', 'month'] | None = None) bool [source]
Returns true if any time tuple in the list of tuples in a overlaps with a time tuple in b.