# Comparing a List of Date Range

**URL:** <https://forum.bubble.io/t/comparing-a-list-of-date-range/264026>\
**Category:** Need help\
**Created:** [May 23, 2023, 12:21pm UTC](https://forum.bubble.io/t/comparing-a-list-of-date-range/264026 "2023-05-23T12:21:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenlaji](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kenlaji/32/30639_2.png) [@kenlaji](https://forum.bubble.io/u/kenlaji)\
**Post date:** [May 23, 2023, 12:21pm UTC](https://forum.bubble.io/t/comparing-a-list-of-date-range/264026/1 "2023-05-23T12:21:00Z")

</div>

I am trying to do a calculation to check if a given date is in a field defined as a List of Date Range. I cannot find a suitable operator to do this. The limitation seems to be that whilst the ‘contains’ operator can check a single line (like ‘first item’) in that array, I cannot find a way to check if the date matches ANY of the entries in that list. Any suggestions?

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [May 23, 2023, 12:26pm UTC](https://forum.bubble.io/t/comparing-a-list-of-date-range/264026/2 "2023-05-23T12:26:07Z")

</div>

Hi there, @kenlaji… I have never done what you described, so I would have to work through an example to see exactly how to do it. That being said, you should be able to use the _:contains point_ operator to check each date range in the list to see if the range contains the given date. Have you gone down that path already?

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![kenlaji](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kenlaji/32/30639_2.png) [@kenlaji](https://forum.bubble.io/u/kenlaji)\
**Post date:** [May 23, 2023, 1:23pm UTC](https://forum.bubble.io/t/comparing-a-list-of-date-range/264026/3 "2023-05-23T13:23:40Z")

</div>

Thanks @mikeloc . Yes I have. So when I start referencing the Thing with the list of date ranges, ‘Contains Point’ operator is not available (Contains does not complete, seems to expect something and remains red) When I attempt ‘each item’, the options once again does not have a way of specifying a random point - only start, end or center. A true no code limitation @josh ?

![contains](https://us1.discourse-cdn.com/bubble/original/3X/a/8/a82456ef8a25592d8e37d534699138a5be52efc0.jpeg)  
 ![contains_2](https://us1.discourse-cdn.com/bubble/original/3X/d/5/d5a774b1f0fd7969679802ab84fa436a46adab4c.jpeg)

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [May 23, 2023, 1:46pm UTC](https://forum.bubble.io/t/comparing-a-list-of-date-range/264026/5 "2023-05-23T13:46:13Z")

</div>

This might not help because I don’t know exactly what your setup looks like, but here is an example where I have a field called `availability` on the `User` data type, and that field is a list of date ranges. Then, I have a date picker on the page, and I have a repeating group that gets the date ranges from the current user’s `availability` list where the date range in the list contains the date (point) that has been selected from the date picker.

 ![contains-point](https://us1.discourse-cdn.com/bubble/original/3X/5/7/57f8f19803f3776d14cc5c5eb402bc046228f7f0.png)

---

<div class="post-metadata">

**Author:** ![kenlaji](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kenlaji/32/30639_2.png) [@kenlaji](https://forum.bubble.io/u/kenlaji)\
**Post date:** [May 23, 2023, 2:16pm UTC](https://forum.bubble.io/t/comparing-a-list-of-date-range/264026/6 "2023-05-23T14:16:09Z")

</div>

Thanks very much - that worked! I think not having ‘contains point’ operator on the expected place (in the panel I was talking about above) is a real limitation and I will add that to the Bubble feature requests 🙂

---

<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:** [August 1, 2023, 12:21pm UTC](https://forum.bubble.io/t/comparing-a-list-of-date-range/264026/7 "2023-08-01T12:21:35Z")

</div>

Closed on August 1, 2023, 12:21pm UTC

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