# Method Calendar.TimeRanges.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.