IDateCalculationStrategy Interface
Definition
- Namespace
- Bodu.Globalization.Calendar.Algorithms
- Assembly
- Bodu.Globalization.Calendar.dll
- Package
- Bodu.Globalization.Calendar 1.0.1
Defines the calculation contract for a single rule strategy: given a Gregorian year, produce the occurrence of the notable date in that year, if any.
public interface IDateCalculationStrategy
- Extension Methods
Remarks
The engine ships a strategy per authoring shape - among them FixedDateStrategy, DayOfWeekInMonthStrategy, RelativeWeekdayInMonthStrategy, WeekdayNearDateStrategy, OffsetFromRuleStrategy, and AlgorithmDateStrategy (which dispatches to a registered INotableDateAlgorithm). A strategy is selected per rule when a document is loaded; consumers extend the catalogue through INotableDateAlgorithm rather than by implementing this interface directly.
Methods
Calculate(int, StrategyResolutionContext)
Calculates the occurrence of the notable date in the supplied Gregorian year.
DateOnly? Calculate(int year, StrategyResolutionContext context)
Parameters
yearintThe Gregorian year in which to calculate the occurrence.
contextStrategyResolutionContextThe resolution context used by referential strategies to resolve other rules.
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |