Basically I want to calculate the number of specific days (Monday, Friday) in a date range. So for example, from 7th Sep 2021 to 18th Sep 2021, I know that there are 1x Monday and 2x Fridays. How can I calculate this from bubble?
Thanks!
Basically I want to calculate the number of specific days (Monday, Friday) in a date range. So for example, from 7th Sep 2021 to 18th Sep 2021, I know that there are 1x Monday and 2x Fridays. How can I calculate this from bubble?
Thanks!
Interesting. One way to do this is a little intricate. I would look forward to hearing how other folks would approach this as it should be much easier I would think.
Anyways here it goes:
Loop through the days extracting their number and then group them to count them (using :group by)
Explore a karma ware plugin called list shifter to do this in the browser or you can do the looping via backend workflows
There are a few steps to do this but I am just laying out the broad strokes
@mikeloc @jared.gibb how would you guys approach this? Very interested in knowing your take
Thanks @cmarchan
Well… if I may, my calendar plugin will do this for you
And it’ll display them nicely too! And not just the dates. It’ll produce them as date/time intervals
But if not
I’d personally use the Luxon JavaScript library and some looping in a custom built plugin and cut the bubbly headache.
You need to loop between the days contained by your start and end date. If the Fay equals a Monday or Friday, push it into a list. Publish the list and now you know which days fall on which dates.
Thanks for the thorough response. Your calendar plugin provides a lot of functionality!
What plugin is this?
Hey @fredericksia1991 !
It’s the Full Calendar Scheduler Suite
If you’re interested, I can set you up on a trial so you can try it before you buy it! A couple weeks should be plenty of time AND I offer support setting up as I don’t have all the docs for the Timeslot generator. But I am very available and it’s actually fairly simple to use!
I’d wait to use it until my next update goes through. I’m waiting for almost 2 weeks now. The update introduces some breaking changes and correlates with the documentation. Either way, I’ll provide support throughout!
This topic was automatically closed after 70 days. New replies are no longer allowed.