Table of Contents

NotableDate Class

Definition

Namespace
Bodu.Globalization.Calendar
Assembly
Bodu.Globalization.Calendar.dll
Package
Bodu.Globalization.Calendar 1.0.1
Source
NotableDate.cs

Represents a single resolved notable-date occurrence, carrying both the emitted date and the source metadata needed for diagnostics and auditability.

public sealed record NotableDate : IEquatable<NotableDate>
Inheritance
NotableDate
Implements
Inherited Members
Extension Methods

Constructors

NotableDate(DateOnly, DateOnly?, bool, NotableDateRuleIdentity, string, string, NotableDateCategory, int, int, bool, IReadOnlyList<string>, string?, string?)

Represents a single resolved notable-date occurrence, carrying both the emitted date and the source metadata needed for diagnostics and auditability.

public NotableDate(DateOnly Date, DateOnly? ActualDate, bool IsObserved, NotableDateRuleIdentity Identity, string DisplayName, string TerritoryCode, NotableDateCategory Category, int Priority, int DurationDays, bool IsNonWorkingDay, IReadOnlyList<string> Tags, string? AdjustmentPolicyId, string? AdjustmentReason)

Parameters

Date DateOnly

The emitted occurrence date (the observed date when an adjustment applied).

ActualDate DateOnly?

The originally calculated occurrence date.

IsObserved bool

Whether the emitted date differs from the calculated date because an adjustment applied.

Identity NotableDateRuleIdentity

The full identity of the rule that produced the occurrence.

DisplayName string

The display name of the notable-date concept.

TerritoryCode string

The territory the occurrence was resolved for.

Category NotableDateCategory

The effective category of the rule.

Priority int

The selection priority of the rule that produced the occurrence.

DurationDays int

The number of days the occurrence spans, inclusive of the first day.

IsNonWorkingDay bool

Whether the occurrence is a non-working day.

Tags IReadOnlyList<string>

The tags declared by the rule that produced the occurrence.

AdjustmentPolicyId string

The identifier of the adjustment policy that produced the observed date, if any.

AdjustmentReason string

The reason recorded by the adjustment policy, if any.

See Also

Properties

ActualDate

The originally calculated occurrence date.

public DateOnly? ActualDate { get; init; }

Property Value

DateOnly?

AdjustmentPolicyId

The identifier of the adjustment policy that produced the observed date, if any.

public string? AdjustmentPolicyId { get; init; }

Property Value

string

AdjustmentReason

The reason recorded by the adjustment policy, if any.

public string? AdjustmentReason { get; init; }

Property Value

string

Category

The effective category of the rule.

public NotableDateCategory Category { get; init; }

Property Value

NotableDateCategory

Date

The emitted occurrence date (the observed date when an adjustment applied).

public DateOnly Date { get; init; }

Property Value

DateOnly

DisplayName

The display name of the notable-date concept.

public string DisplayName { get; init; }

Property Value

string

DurationDays

The number of days the occurrence spans, inclusive of the first day.

public int DurationDays { get; init; }

Property Value

int

EndDate

Gets the last day the occurrence spans.

public DateOnly EndDate { get; }

Property Value

DateOnly

The inclusive end date, equal to Date for a single-day occurrence and Date + DurationDays - 1 for a multi-day span.

Identity

The full identity of the rule that produced the occurrence.

public NotableDateRuleIdentity Identity { get; init; }

Property Value

NotableDateRuleIdentity

IsNonWorkingDay

Whether the occurrence is a non-working day.

public bool IsNonWorkingDay { get; init; }

Property Value

bool

IsObserved

Whether the emitted date differs from the calculated date because an adjustment applied.

public bool IsObserved { get; init; }

Property Value

bool

NotableDateId

Gets the identifier of the notable-date concept that produced the occurrence.

public string NotableDateId { get; }

Property Value

string

The notable-date id from Identity.

Priority

The selection priority of the rule that produced the occurrence.

public int Priority { get; init; }

Property Value

int

RuleId

Gets the identifier of the rule that produced the occurrence.

public string RuleId { get; }

Property Value

string

The rule id from Identity.

Tags

The tags declared by the rule that produced the occurrence.

public IReadOnlyList<string> Tags { get; init; }

Property Value

IReadOnlyList<string>

TerritoryCode

The territory the occurrence was resolved for.

public string TerritoryCode { get; init; }

Property Value

string

Methods

Deconstruct(out DateOnly, out DateOnly?, out bool, out NotableDateRuleIdentity, out string, out string, out NotableDateCategory, out int, out int, out bool, out IReadOnlyList<string>, out string?, out string?)

public void Deconstruct(out DateOnly Date, out DateOnly? ActualDate, out bool IsObserved, out NotableDateRuleIdentity Identity, out string DisplayName, out string TerritoryCode, out NotableDateCategory Category, out int Priority, out int DurationDays, out bool IsNonWorkingDay, out IReadOnlyList<string> Tags, out string? AdjustmentPolicyId, out string? AdjustmentReason)

Parameters

Date DateOnly
ActualDate DateOnly?
IsObserved bool
Identity NotableDateRuleIdentity
DisplayName string
TerritoryCode string
Category NotableDateCategory
Priority int
DurationDays int
IsNonWorkingDay bool
Tags IReadOnlyList<string>
AdjustmentPolicyId string
AdjustmentReason string

Equals(NotableDate?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(NotableDate? other)

Parameters

other NotableDate

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(NotableDate?, NotableDate?)

public static bool operator ==(NotableDate? left, NotableDate? right)

Parameters

left NotableDate
right NotableDate

Returns

bool

operator !=(NotableDate?, NotableDate?)

public static bool operator !=(NotableDate? left, NotableDate? right)

Parameters

left NotableDate
right NotableDate

Returns

bool

Applies to

ProductVersions
.NET8, 10

See Also