Is there any way to to do this:
range(P1,P2) ==> 3
So then I would like to check time periods if they are between P1 and P2?
you could make key-value pairs by just using tuples.
(P1, P2) => 3
and could check the datetime by something like
P1 <= dt <= P2
there’s a sample package using
check its source code if you like.