Tests for calculating periods