| Extracted from Pike v7.8 release 866 at 2016-04-05.

[Top]
Calendar
Calendar.TimeRange

# Method Calendar.TimeRange()->offset_to()

Method offset_to

  `int offset_to(TimeRange x)`

Description

  Calculates offset to x; this compares two timeranges and gives the integer offset between the two starting points.

  This is true for suitable a and b: `a+a->offset_to(b)==b`

  By suitable means that a and b are of the same type and size. This is obviously true only if a+n has b as a possible result for any n.