I’m trying to block of available dates when a listing is booked, but the blocked dates are a list and the booked dates are a range. How do I extract or convert a range into a list?
+1 I’d like to know how to make such a conversion too.
In the meantime, we’ve been struggling the same issue with @thibault.marty and found a solution (if you can post it)
I’ve asked one of my developers to focus on that task Monday. He’s good at figuring this stuff out.
He wrote a plugin that does it. We can make it public if that helps, we just have to write some documentation on it so it would be like $7 for people to use.
That’s a great new!
@alex.p any chance this is available? I’d happily pay for it right now. And I’m sure many who’ve looked at List Dates Between Date Range (including first and last date) would, too. This is quite a frustrating problem.
Hey @samnichols - my Parallels plugin does this and more. (You might be interested in the “Range List Check” action, which can take some list of input ranges and spit out which ranges intersect with some other list of ranges and/or individual dates.) Of course, it also has an action for taking a date range and splitting it up into any number of subdivisions (such as the individual days that contain the range, but it can do that for any arbitrary time slice) - that action is “Split/Construct Ranges”.
Note: While I did recently make an update to Parallels, that plugin is basically feature complete and I don’t plan on adding much new to it soon or ever. So, I’d suggested subscribing to it first and seeing if it works for your use case before committing to the full purchase price. Of course, if there’s a missing feature you are welcome to make a request over in the Parallels thread.
Thanks for the suggestion. I actually just found Date & Time Toolkit Plugin | Bubble about 15 minutes ago, and so far it’s pulling a list of dates from a date range just fine. I’m creating recurring calendar events, but each individual event created from the recurring event needs to be editable, so I needed to grab a list of dates and make a loop to create events individually for the entire list. Seems like this will work!
Yep, @AliFarahat’s plugin will also split a range into a list of arbitrary dates. (It uses the moment and moment-range libraries, so it’s a bit heavier-weight than Parallels, which uses Luxon, but it’ll do what you need.)