# How to extract Specific Days from a Date Range

**URL:** <https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170>\
**Category:** Need help\
**Created:** [September 7, 2021, 12:49pm UTC](https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170 "2021-09-07T12:49:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredericksia1991](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@fredericksia1991](https://forum.bubble.io/u/fredericksia1991)\
**Post date:** [September 7, 2021, 12:49pm UTC](https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170/1 "2021-09-07T12:49:03Z")

</div>

![photo_2021-09-07 20.47.26](https://us1.discourse-cdn.com/bubble/original/3X/5/e/5ea744e677ed266c9c6193e03ded14270335190f.jpeg)

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!

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [September 7, 2021, 1:06pm UTC](https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170/2 "2021-09-07T13:06:28Z")

</div>

@fredericksia1991

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 👍🏻

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [September 7, 2021, 1:29pm UTC](https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170/3 "2021-09-07T13:29:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [September 7, 2021, 1:34pm UTC](https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170/4 "2021-09-07T13:34:51Z")

</div>

@jared.gibb

Thanks for the thorough response. Your calendar plugin provides a lot of functionality! 👍🏻

---

<div class="post-metadata">

**Author:** ![fredericksia1991](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@fredericksia1991](https://forum.bubble.io/u/fredericksia1991)\
**Post date:** [September 8, 2021, 2:56am UTC](https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170/5 "2021-09-08T02:56:47Z")

</div>

What plugin is this?

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [September 8, 2021, 3:49am UTC](https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170/6 "2021-09-08T03:49:24Z")

</div>

Hey @fredericksia1991 !

It’s the [Full Calendar Scheduler Suite](http://forum.bubble.io/t/plugin-full-calendar-scheduler-suite/145087/143)

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [November 16, 2021, 12:49pm UTC](https://forum.bubble.io/t/how-to-extract-specific-days-from-a-date-range/168170/7 "2021-11-16T12:49:18Z")

</div>

Closed on November 16, 2021, 12:49pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
