Subject: | Feature request: grow() or merge() ? |
Hi Tony,
Have you thought about adding a grow() or merge()? I have a jillion
date ranges coming out of an XML file and I want to merge them into the
simplest set of ranges possible to store in my database.
Perhaps I'll write Date::RangeSet, something like:
while (my $range = ...) {
$rangeset->add($range);
}
$rangeset->merge;
foreach my $range ($rangeset->all) {
# store in database
}
So 100 input ranges could end up being merged into a single range
(complete overlap), or 10 ranges (some overlap), or 100 ranges (no overlap).
Unless you can think of a elegant way to accomplish this with
Date::Range? :) Thanks,
j