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
DateDateOnlyThe emitted occurrence date (the observed date when an adjustment applied).
ActualDateDateOnly?The originally calculated occurrence date.
IsObservedboolWhether the emitted date differs from the calculated date because an adjustment applied.
IdentityNotableDateRuleIdentityThe full identity of the rule that produced the occurrence.
DisplayNamestringThe display name of the notable-date concept.
TerritoryCodestringThe territory the occurrence was resolved for.
CategoryNotableDateCategoryThe effective category of the rule.
PriorityintThe selection priority of the rule that produced the occurrence.
DurationDaysintThe number of days the occurrence spans, inclusive of the first day.
IsNonWorkingDayboolWhether the occurrence is a non-working day.
TagsIReadOnlyList<string>The tags declared by the rule that produced the occurrence.
AdjustmentPolicyIdstringThe identifier of the adjustment policy that produced the observed date, if any.
AdjustmentReasonstringThe reason recorded by the adjustment policy, if any.
- See Also
Properties
ActualDate
The originally calculated occurrence date.
public DateOnly? ActualDate { get; init; }
Property Value
AdjustmentPolicyId
The identifier of the adjustment policy that produced the observed date, if any.
public string? AdjustmentPolicyId { get; init; }
Property Value
AdjustmentReason
The reason recorded by the adjustment policy, if any.
public string? AdjustmentReason { get; init; }
Property Value
Category
The effective category of the rule.
public NotableDateCategory Category { get; init; }
Property Value
Date
The emitted occurrence date (the observed date when an adjustment applied).
public DateOnly Date { get; init; }
Property Value
DisplayName
The display name of the notable-date concept.
public string DisplayName { get; init; }
Property Value
DurationDays
The number of days the occurrence spans, inclusive of the first day.
public int DurationDays { get; init; }
Property Value
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 - 1for a multi-day span.
Identity
The full identity of the rule that produced the occurrence.
public NotableDateRuleIdentity Identity { get; init; }
Property Value
IsNonWorkingDay
Whether the occurrence is a non-working day.
public bool IsNonWorkingDay { get; init; }
Property Value
IsObserved
Whether the emitted date differs from the calculated date because an adjustment applied.
public bool IsObserved { get; init; }
Property Value
NotableDateId
Gets the identifier of the notable-date concept that produced the occurrence.
public string NotableDateId { get; }
Property Value
Priority
The selection priority of the rule that produced the occurrence.
public int Priority { get; init; }
Property Value
RuleId
Gets the identifier of the rule that produced the occurrence.
public string RuleId { get; }
Property Value
Tags
The tags declared by the rule that produced the occurrence.
public IReadOnlyList<string> Tags { get; init; }
Property Value
TerritoryCode
The territory the occurrence was resolved for.
public string TerritoryCode { get; init; }
Property Value
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
DateDateOnlyActualDateDateOnly?IsObservedboolIdentityNotableDateRuleIdentityDisplayNamestringTerritoryCodestringCategoryNotableDateCategoryPriorityintDurationDaysintIsNonWorkingDayboolTagsIReadOnlyList<string>AdjustmentPolicyIdstringAdjustmentReasonstring
Equals(NotableDate?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(NotableDate? other)
Parameters
otherNotableDateAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
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
leftNotableDaterightNotableDate
Returns
operator !=(NotableDate?, NotableDate?)
public static bool operator !=(NotableDate? left, NotableDate? right)
Parameters
leftNotableDaterightNotableDate
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |