Forum Academy Marketplace Showcase Pricing Features

Parallels: Date and Date Range Transformer (Now with Video Demos! 🎉)

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:

Runtime: https://list-shifter-demo.bubbleapps.io/version-test/parallels-construct-date-in-zone?debug_mode=true

Editor: List-shifter-demo | Bubble Editor

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.

1 Like

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?

Greetings,

is there a version of this available now?

Hey @keith,

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!

Best,
Felix

Hi Keith:

Bought your plugin to play around with it.

I’ve watched all the videos on this thread and have a very simple question.

In transform date range, I’ve inputted a list of ranges to transform in INPUT DATES OR RANGES.

I then input the duration I want to shift the date range in MODIFY DATE RANGES BY DURATION:

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. :slight_smile:

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.

1 Like

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.

Hello @keith ! How you doing?

Keith, I have to perform 3 date transformations and 2 searches. Image bellow:

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.

Do you have any recomendation for it?

Thanks!

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.

1 Like

Psst… Parallels is currently on sale: Black Friday 2022 🦃 Sale: Calendar Grid Pro, Parallels, Floppy on Sale through Nov 27, 2022

1 Like