code: def pattern
        ranges = dates.group_by(&:wday).values.map { |weekdates| (weekdates.min..weekdates.max) }
        TemporalPatterns::Pattern.new(ranges, 1.week)
      end
docs: ---------------- Date intervals and patterns -----------------