nager / Nager.Date

Worldwide holidays (REST API), NuGet or docker container :earth_americas:
https://date.nager.at
MIT License
1.06k stars 171 forks source link

Refactoring HolidayProvider #622

Closed BelmoMusta closed 3 months ago

BelmoMusta commented 3 months ago

In order not to repeat these instructions that are found in so many classes:

var holidays = HolidaySpecificationProcessor.Process(holidaySpecifications, countryCode);
return holidays.OrderBy(o => o.Date);

This logic is refactored in one abstract class AbstractHolidayProvider, which is inherited by other countries' providers

tinohager commented 3 months ago

@samtrion These are actually the changes we've already discussed, and I think they would suit me.

samtrion commented 3 months ago

The approach suits me and is complete with regard to the architecture tests.