rd.dates_and_calendars.date_schedule does not return the correct non working dates

Hello.

I assume there is a bug in the method rd.dates_and_calendars.date_schedule .

When the end date is a public holidays, it returns the day after, if start_date == end_date.

Please, check the code below and advice.

Thanks


public-holidays-us.png


error-date-schedule.png

Expected behaviour: the list should be empty

If I change the start_date to set it to a working day, then the behaviour is correct.



Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @yaokoffi.kouassi ,

    I can reproduce the same issue with RDP endpoint /data/quantitative-analytics-dates-and-calendars/v1/date-schedule

    Hence, ticket number 14072196 was raised on your behalf to check this logic with the product team and helpdesk will contact you shortly regarding this.

Answers

  • Hi @yaokoffi.kouassi ,

    Thank you for your question. The way the function works is such that if there is no working day in the time window (in between start_date & end_date), then the next working day is returned:

    1728912206727.png


    Otherwise, if there is any working day at all in the window, these are the only ones returned:


    1728912350068.png

  • HI @jonathan.legrand ,

    Thank you for your explanation. This is definitely a bug because, if you ask for working days and you set a date range for those working days, then, the function should return an empty list if there is not any working dates.


    Should I log an issue then ?