EuropeCalendarData Class
Definition
- Namespace
- Bodu.Globalization.Calendar
- Assembly
- Bodu.Globalization.Calendar.Europe.dll
- Package
- Bodu.Globalization.Calendar.Europe 1.0.0
- Source
- EuropeCalendarData.cs
Provides access to the embedded Europe notable-date resource pack (United Kingdom, France, Germany), built on the notable-date schema.
public static class EuropeCalendarData
- Inheritance
-
EuropeCalendarData
- Inherited Members
Examples
// Scotland observes a different bank-holiday set from the rest of Great Britain.
NotableDateService service = EuropeCalendarData.CreateService("GB-SCT");
DateRange year = new(new DateOnly(2026, 1, 1), new DateOnly(2026, 12, 31));
IReadOnlyList<NotableDate> holidays = service.Resolve(year, "GB-SCT");
Remarks
Each supported country is a self-contained embedded resource. A territory may be a country code (GB) or a
subdivision (GB-SCT); the subdivision selects the same country resource, and the resolver filters by the full
territory at query time.
When to use. Call CreateService(string) for a ready-to-query NotableDateService, or LoadResource(string) when you need the underlying NotableDateResource to compose with custom collaborators or providers.
Properties
SupportedCountries
Gets the country codes the Europe pack provides resources for.
public static IReadOnlyList<string> SupportedCountries { get; }
Property Value
- IReadOnlyList<string>
The supported ISO 3166-1 alpha-2 country codes.
Methods
CreateService(string)
Builds a resolver over the resource for the country owning the supplied territory.
public static NotableDateService CreateService(string territory)
Parameters
territorystringA country code or subdivision (for example
GBorGB-SCT).
Returns
- NotableDateService
A service over the country's resource.
Exceptions
- ArgumentNullException
territoryis null.- ArgumentException
The territory's country is not provided by this pack.
LoadResource(string)
Loads the notable-date resource for the country owning the supplied territory.
public static NotableDateResource LoadResource(string territory)
Parameters
territorystringA country code or subdivision (for example
GBorGB-SCT).
Returns
- NotableDateResource
The loaded NotableDateResource.
Exceptions
- ArgumentNullException
territoryis null.- ArgumentException
The territory's country is not provided by this pack.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |