Forum Academy Marketplace Showcase Pricing Features

Time/date format question

Hi,

I am trying to print a date in the following format and I am stuck. I hope you can help:

Starting point is a date the user entered (I saved this one to a table) -> Now I need to print the date that is like 2 weeks later but consider weeksends and holidays.
The final output should check: If the date that is 2 weeks later is a saturday or sunday use the next workday -> if the date ends on a holiday day, also use the next business day.

example: (let’s assume its holidays from 02. Nov .2015 - 06. Nov 2015)
Starting date: 19. Okt 2015
2 weeks later: 02. Nov 2015
BUT its holiday and weekend, so final date is: 09. Nov 2015

I’ve got four problems to solve that:

  1. How do I make the tool to check if date+2weeks is a saturday or sunday?
  2. How cam I add the holidays - I need to add single dates as well as a range of dates.
  3. How to check if the date is a holiday day
  4. How do I add “weeks” to a date. I only managed to add x-days but this isn’t the same

I hope you can give me some tips on how to realise that.
Thank you :smile:

Best

This isn’t available on Bubble yet.

If it’s totally and absolutely necessary for you,I worked on a possible workaround. It’s complicated, and a little time consuming, but do-able I think.

I made a little demo for you on the test app:

The Page name is vaca_holidays

You can test it for Thanksgiving. So your input date would be 11/12

I can walk you through the workaround in more detail if you would like, but, again, would take some time on your end to implement.

2 Likes

Hey @Bambooo did you find a solution for this?