Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 API date format change #46

Closed
SydneyChadwick opened this issue Mar 12, 2025 · 1 comment
Closed

V3 API date format change #46

SydneyChadwick opened this issue Mar 12, 2025 · 1 comment

Comments

@SydneyChadwick
Copy link
Contributor

The required date format for isPublicHoliday and isWorkDay seems to have changed from V2 to V3.

V2 makes use of dd-mm-yyyy
https://kayaposoft.com/enrico/json/v2.0/?action=isPublicHoliday&date=29-05-2022&country=zaf

However it seems that yyyy-mm-dd is now required for V3
https://kayaposoft.com/enrico/json/v3.0/isPublicHoliday/?date=2022-05-29&country=zaf

Passing a bogus string to V3 the validation still says that dd-mm-yyyy is required
https://kayaposoft.com/enrico/json/v3.0/isPublicHoliday/?date=20220529&country=zaf
{"error":"Invalid date '20220529'! Date string must be in format dd-mm-YYYY, e.g. 15-01-2035"}

With the validation and the actual date format being inconsistent, I just want to be sure whether this change is intentional and the format can be expected for the foreseeable future?

@jurajmajer
Copy link
Owner

Thanks for reporting. The date format should be YYYY-mm-dd in V3 and it will remain that way in this version forever. I have fixed the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants