Table of Contents

RateDateResolution Enum

Definition

Namespace
Bodu.Financial.ExchangeRates
Assembly
Bodu.Financial.dll
Package
Bodu.Financial 1.0.0
Source
RateDateResolution.cs

Describes how an exchange-rate lookup should resolve a requested date when an exact match is unavailable.

public enum RateDateResolution
Extension Methods

Fields

Exact = 0

Only a rate observed on the exact requested date is accepted.

PreviousOnOrBefore = 1

The closest available rate whose date is less than or equal to the requested date is used.

NextOnOrAfter = 2

The closest available rate whose date is greater than or equal to the requested date is used.

Nearest = 3

The rate whose date is closest to the requested date by absolute day distance is used; ties are rejected.

NearestPreferPrevious = 4

The available rate whose date is closest to the requested date is used; if the previous and next dates are equally close, the previous date wins. When the two candidates have different distances, the closer one is selected regardless of preference - the preference applies only at exact ties.

NearestPreferNext = 5

The available rate whose date is closest to the requested date is used; if the previous and next dates are equally close, the next date wins. When the two candidates have different distances, the closer one is selected regardless of preference - the preference applies only at exact ties.

Remarks

The selected resolution interacts with ToleranceDays to bound how far a fallback date may be from the requested date. Exact never falls back and therefore requires a tolerance of zero.

For accounting and tax workflows where silently selecting a future rate is undesirable, prefer PreviousOnOrBefore.

Applies to

ProductVersions
.NET8, 10