Custom Holiday Calendar Example

I have a Set of LocatDates which are holidays that I need to be used (instead of GBL, USNY, etc.).

Is there an example somewhere where a Set of LocalDates is used to create a HolidayCalendar ?

See HolidayCalendarData.ini in the very latest on GitHub. It is simply a list of dates, keyed by the holiday calendar ID.

Thank you very much for the rapid response.

I think that I was unclear, my apologies fir that.

I need to do this on-the-fly, not statically. That is, the Set of LocatDates will be available only at runtime, and can change over time. So, it’s not something we can put into the static configuration mechanism as a resource in a jar.

We can certainly use ImmutableHolidayCalendar programmatically, if that is the best way to go with this?

This use case is normally handled by populating ReferenceData with the holiday calendar data. You use your own instance of ReferenceData instead of ReferenceData.standard().

Perfect - that works great - thank you very much for your help