Skip to content

Commit

Permalink
Heard Island and McDonald Islands - Add HolidayProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Oct 18, 2024
1 parent 4762849 commit 01a65f3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Nager.Date.Models;
using System.Collections.Generic;

namespace Nager.Date.HolidayProviders
{
/// <summary>
/// Heard Island and McDonald Islands HolidayProvider
/// </summary>
internal sealed class HeardIslandAndMcDonaldIslandsHolidayProvider : AbstractHolidayProvider
{
/// <summary>
/// Heard Island and McDonald Islands HolidayProvider
/// </summary>
public HeardIslandAndMcDonaldIslandsHolidayProvider() : base(CountryCode.HM)
{
}

/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{
/*
* Heard Island and McDonald Islands has no population therefore no official holidays.
*/

var holidaySpecifications = new List<HolidaySpecification>();
return holidaySpecifications;
}

/// <inheritdoc/>
public override IEnumerable<string> GetSources()
{
return
[
"https://en.wikipedia.org/wiki/Heard_Island_and_McDonald_Islands"
];
}
}
}
1 change: 1 addition & 0 deletions src/Nager.Date/HolidaySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public static class HolidaySystem
{ CountryCode.GG, new Lazy<IHolidayProvider>(() => new GuernseyHolidayProvider(_catholicProvider))},
{ CountryCode.GY, new Lazy<IHolidayProvider>(() => new GuyanaHolidayProvider(_catholicProvider))},
{ CountryCode.HK, new Lazy<IHolidayProvider>(() => new HongKongHolidayProvider(_catholicProvider))},
{ CountryCode.HM, new Lazy<IHolidayProvider>(() => new HeardIslandAndMcDonaldIslandsHolidayProvider())},
{ CountryCode.HN, new Lazy<IHolidayProvider>(() => new HondurasHolidayProvider(_catholicProvider))},
{ CountryCode.HR, new Lazy<IHolidayProvider>(() => new CroatiaHolidayProvider(_catholicProvider))},
{ CountryCode.HT, new Lazy<IHolidayProvider>(() => new HaitiHolidayProvider(_catholicProvider))},
Expand Down

0 comments on commit 01a65f3

Please sign in to comment.