Table of Contents

MiddleEastCalendarData Class

Definition

Namespace
Bodu.Globalization.Calendar
Assembly
Bodu.Globalization.Calendar.MiddleEast.dll
Package
Bodu.Globalization.Calendar.MiddleEast 1.0.0
Source
MiddleEastCalendarData.cs

Provides access to the embedded Middle East notable-date resource pack (the United Arab Emirates, Saudi Arabia, Israel, Turkey, Qatar, and Jordan), built on the notable-date schema.

public static class MiddleEastCalendarData
Inheritance
MiddleEastCalendarData
Inherited Members

Examples

// Query United Arab Emirates public holidays for a year.
NotableDateService service = MiddleEastCalendarData.CreateService("AE");
DateRange year = new(new DateOnly(2026, 1, 1), new DateOnly(2026, 12, 31));
IReadOnlyList<NotableDate> holidays = service.Resolve(year, "AE");

Remarks

Each supported country is a self-contained embedded resource. A territory may be a country code (AE) or a subdivision; the subdivision selects the same country resource, and the resolver filters by the full territory at query time. Several packs declare a Friday/Saturday working week so weekend semantics resolve correctly.

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 Middle East 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

territory string

A country code or subdivision (for example AE).

Returns

NotableDateService

A service over the country's resource.

Exceptions

ArgumentNullException

territory is 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

territory string

A country code or subdivision (for example AE).

Returns

NotableDateResource

The loaded NotableDateResource.

Exceptions

ArgumentNullException

territory is null.

ArgumentException

The territory's country is not provided by this pack.

Applies to

ProductVersions
.NET8, 10

See Also