Update note: Just pushed Parallels version 1.0.14, which gives a bunch of upgrades to the Action previously known as âConstruct Date in Zoneâ. (I had snuck that action in to 1.0.11 - which added IANA Timezone menu stuff - but hadnât fully completed it.)
Now called âConstruct Date/Date Range in Zoneâ, this action allows you to construct a date in an arbitrary zone using a similar interface to Luxonâs âConstruct Date/Time from Objectâ API, which is quite powerful.
(You can do fairly abstract things like get the ISO starting date of some arbitrary year, for example - as shown in the demo below. Or you can just specify month, day, year, and time parameters [if desired]. Fields you leave empty default to sensible values. So, for example, you can construct the starting date of âOctoberâ of this year in some arbitrary timezone by simply setting the zone and setting the âMonthâ field to 10.)
The capabilities are now fully documented in the interface to this Action.
You can also now construct a range, by adding or subtracting some duration from the resulting constructed date, without having to call an additional action.
Hereâs a simple demo page that shows what it can construct and what it can spit out:
This action also now supports the Parallels âAUX outputâ system, and allows you to push the computed values not just to the defined outputs (which include Construct: Date in Zone, Construct: Date in Zone Valid, Construct: Date in Zone Invalid Reason, Construct: Date Range in Zone, Construct: Date in Zone Timezone Used), but which also allows you to push the constructed date to an AUX date output, the constructed range to that AUXâs date range output, and the timezone used to that AUXâs label output.
Iâm hoping you can help. Iâm trying to add unavailable dates to a calendar picker. What I need to do is compare the list of ranges of unavailable dates with the dates selected, which I believe I can do with the range list check, but then I need to split the bad ranges into a range of individual days, not a list of ranges. Is there anyway to do that?
this plugin helped me to resolve an issue I was after for weeks. My app is a reservation platform and as you can only reserve full days, I use a logic that all reservation have the time 00:00:00. This led to problems when users made reservations in other timezones as the âDo a searchâ then didnât return the same results for all users. From now on I will store all date/times in one timezone and use the parallel object to normalize them to the timezone of the user. Works pretty well so far!
Thanks for your support and the great explanatory videos. Much appreciated!
I had thought that the value from the parallels element in Transform: Date range list would give me the input shifted by the duration.
However, I only get the original date range (March 2, 2020 8:00am to March 2, 2020 12:00pm) instead of a new date range shifted by the desired duration.
I suppose I must be missing a very simple thing?
Also, love the plugins and the fun videos - installed listshifter in an app just to learn it and contributed to you at grupz since it was karma ware.
And I wondered - using Parallels, is there a possibility to subtract a list of ranges from a list of ranges and come up with the resulting new ranges? This seems to be not a straightforward thing, I suppose.
Hi @askanatty, thanks for the support! Iâm not sure I understand your issue entirely, but in MODIFY DATES/RANGES BY DURATION, you donât have a Duration Interval set. You need to select that. Also, you havenât selected a Duration Modifier.
From your screenshot, it looks like youâre trying to change the duration by âdaysâ but you need to select that value from the âDuration Intervalâ dropdown. Also, you need to select the âDuration Modifierâ.
As it says in the documentation you show, ALL THREE fields must be filled out.
The idea is you want to transform some range by some duration. A duration is defined by some Interval
(a scalar numeric value like â4â) ⌠but 4 what? Four days? Four seconds? ⌠thatâs what the Duration Interval tells the plugin. (If you select âdaysâ there, your interval is now â4 daysâ for example).
And then, âwhat do we want to do with those 4 days?â Is answered by the third field, âDate Modifierâ.
Ah, it seems I misunderstood the documentation. I figured it was something simple.
On my second note - would be it possible to subtract a list of booked date ranges from a list of availability ranges and return a new set of ranges of ranges? It seems this might only be done for one range? (I may be wrong.)
I really appreciate that you take time to answer questions on your plugin! Thank you for the support as well.
Just pushed a new version of Parallels. New version 1.0.15 fixes a bug in the âConstruct Ranges from Datesâ Action. This is a non-breaking change and anyone can safely upgrade to this version.
The specific bug: If you tried to construct ranges by supplying lists for both the Start dates and End dates inputs, nothing would happen. It appears that I had, in fact, forgotten to write any code to handle that case! Now it actually does what you expect. Creating ranges using a single list (of either Start dates or End dates) and supplying a Duration did work correctly, however, and this has not changed.
At the moment Iâm using 2 paralles to perform this.
In one Parallel I set the search 1 to the AUX 4, then the search 2 to the AUX 5.
Then I perform 3 transformations and set them to AUX 1, 2 and 3.
The second Parallel Iâm just using because I ran of AUXs.
Iâm using itâs Aux 2, 3 and 4 to perform merges and minus list with the firt parallesâs AUX.
Iâm getting the desired result with this setup, but Iâm wondering if Iâm doing it the best way.
Wondering if I should use more parallels to perform the transformations in separate workflows, or if I sould split this workflow in some way (using the triggers when transformation is done or when Aux state is set, for exemple ). Not sure.
Yeah, youâre doing it the right way, basically. You can split your workflow into multiple workflows if you need to and trigger on the Set Aux # Complete trigger as appropriate.
UPDATE TIME: Just published Parallels version 1.0.17, which adds an option to provide a LIST of Durations to the Transform Dates action (instead of a scalar Duration). This field accepts a list of numbers, which represent the length of the selected Duration Intervals.
In the Transform Dates action, youâll find a new field to supply a list of durations:
I have a last technical constraint that I canât solve.
Iâm using your parallels plugin to transform a date range list and it works perfectly well.
However, another type of data was attached to this date range list (before modification by parallels) and it is impossible for me to retrieve these elements.
To explain.
I have a list of events. In this data type âeventâ I have a filed âdate rangeâ and a field âtechnicianâ.
So a date range corresponds to a certain technician.
Thanks to your parallels plugin I can modify a date range list coming from a list of events. But unfortunately once transformed with parallels, I canât find any way to link this new transformed date range list with the list of technicians belonging to the initial date range list.
I tried several things with List Shifter, I just bought your floppy plugin to try to add directly a âRange2â data list in my âEventâ datatype. Or âRange2â would be the transformed date range list from Parallels. Then do a âdo a search eventsâ with Range2 as a filter. But i cant use the Add RAM List Value(s) action because this is not same data type between event and date range.
Do you have an idea how i can achieve this ?
With floppy or ListShifter ? (I need to be able to link the new date ranges created with Parallels and the technicians belonging to the old date ranges).
Update time: Realized yesterday that Bubble definitely no longer attempts to minify plugin code when new versions are pushed. So I just pushed version 1.0.18, which minifies the main plugin code (saving 50kb over the unminified version). Recommended update, but adds no new feature/function over version 1.0.17 but why ship all those unneeded bits, yeah?
Hey @johnny - Well, I try not to write plugins that duplicate Bubble functionality. If you have a list of dates (I know by this you mean a list of date objects that represent a day - which we do typically by specifying the start of the day [12 AM in some such timezone on some such day]) and you want to return a list of dates in that list that happen on some certain day in that timezone, thatâs a filter operation.
As in your example: In this list of dates I only want the ones that happen on Tuesday or Thursday. Thatâs just an advanced filter, where the 0-based day number is 2 or 4.
We can use :extract on dates to get the 0-based day number in some specified timezone. (0 = Sunday, 1 = Monday, etc.).
So, all dates that happen on Tuesday or Thursday would be a filter like:
My List of Dates:filtered (This date:extract day is 2) or (This date:extract day is 4)
Now, the part that Bubble doesnât have is that it doesnât have a facility for subdividing a date range into component parts. And this is a feature of Parallels (it can take a date range and split that into any arbitrary list of subdivisions â so, for example, a range into the component âdaysâ, but it could also split that range into subdivisions of any arbitrary time unit, such as â7 minutesâ).
There are other plugins that can do this as well, but Parallels is a great solution for that. However, Calendar Grid Pro also does this (as you can see from the screen shot) upon picking a range (and has a utility function for splitting dates like this as well). There are also free solutions that do this sort of date range â arbitrary date component splitting. But all of them that Iâve seen use the now-deprecated moment library, which is pretty heavy. Parallels uses the luxon library (currently version 1), but itâs a lot less heavy than moment.
(The action for this is called âSplit Rangeâ or something like that.)
Hi @p.daponte, thanks for using Parallels! The Action youâre looking for is Split/Construct Ranges. Youâll find pretty extensive documentation for it in that actionâs interface (and click the âshow documentationâ links under individual fields). Looks like this:
Hereâs an (unfortunately a bit messy) demo page that the screenshot is from. In this page, when you enter a date range by picking two dates in these standard date pickersâŚ
⌠that will cause Split/Construct Ranges to run (because it causes Parallelsâs update function to run, but you could of course trigger Split from any event).
And then, in the text section below, the split date range info appears. In this demo, Iâm splitting the range by days (as you desire to do):
I am using Parallels in conjunction with TopCal plugin, and the fact that Parallels is using Luxon version prior to 2.x is causing a conflict with TopCal, is it possible to update it? Otherwise, I will need to redo my whole system.