duration.rem
duration: C = rem (A, B)
Remainder after division of duration arrays, with the sign of the dividend.
C = rem (A, B) returns the remainder left after
dividing A by B, as a duration array of the size the
two broadcast to. At least one of A and B must be a
duration; the other may be a duration or a numeric array,
which is read as a number of days, the unit a duration counts in.
The result takes its sign from A, where mod takes it from
B: the two agree only where the operands share a sign. A remainder
by a zero duration is NaN, where mod gives A itself.
The display format is taken from whichever operand is a duration,
or from A when both are.
Source Code: duration