Closed strarsis closed 5 years ago
Sure. To go from Twix to moment-range, just do
var range = moment.range(twix.start(), twix.end());
To go the other way:
var twix = range.start.twix(range.end);
(I haven't tested either of those, but I'm pretty sure they work)
Can a twix range converted to a moment-range and back? The all-day range option of twix is very useful for me, but most of the code already uses moment-range.