New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
43 4 5 11

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.



pythonworkspace#technologypython apilseg-data-library
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
7.2k 23 3 6

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


1728912206727.png (29.7 KiB)
1728912350068.png (8.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 0

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 ?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
15.6k 33 5 10

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.