moment-range
moment-range copied to clipboard
Single moment range support and adjacent new ranges intersection interpretation
Single moment range support and testing and adjacent ranges intersection new interpretation
- Added a whole set of unit test for single moment ranges (start == end)
- All former unit tests kept in order to assure former behaviour for all operations
- New interpretation of intersect operation through option.adjacent:true parameter (same behaviour assured if no parameter or false value). In such case (adjacent: true), {---}[---] adjacent ranges, returns a single moment range at the union point, instead of null
Thank you
Hey @franjuan, could you explain why we'd need single moment ranges? I can't see the advantage over just using a moment object.
Well, I would like to work indistinctly with ranges and moments, understandind that a Moment is a range of a single point