Skip Menu |
 

This queue is for tickets about the Date-Range CPAN distribution.

Report information
The Basics
Id: 60527
Status: open
Priority: 0/
Queue: Date-Range

People
Owner: Nobody in particular
Requestors: jhannah [...] omnihotels.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Feature request: grow() or merge() ?
Download (untitled) / with headers
text/plain 655b
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
Download (untitled) / with headers
text/plain 116b
I added a Date::RangeSet class and tests, for your consideration: http://github.com/jhannah/date-range Thanks, j
Download (untitled) / with headers
text/plain 213b
Looks like I forked Date::Range 1.40 back in 2010 https://github.com/jhannah/date-range and added Date::RangeSet to it. But in 2011 Tony release Date::Range 1.41 without my changes. I haven't heard from him.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.