Skip to content

datethyme.TimePartition

This is the documentation page for the TimePartition class.

datethyme.TimePartition

Bases: PartitionProtocol

A contiguous sequence of TimeSpan objects or TimePartition objects (recursive), useful for scheduling.

intuitively

resolve_overlaps(seq, mode=EQUAL|PROPORTIONAL|INVERSE|ECLIPSE|SHIFT) resolve_gaps(seq, mode=EQUAL|PROPORTIONAL|INVERSE|SNAP_FORWARD|SNAP_BACK|SHIFT_FORWARD| SHIFT_BACK) squeeze(seq, mode=PROPORTIONAL|EQUAL, earliest=None, latest=None) stack(seq, mode=forward|middle|backward, anchor=None) truncate(seq, earliest: Time, latest: Time)

truncate_preserve -> return (before, truncated, after)

both can be procrustean or not