RbaEraWorkbook Class
Definition
- Namespace
- Bodu.Financial.ExchangeRates
- Assembly
- Bodu.Financial.ExchangeRates.Rba.dll
- Package
- Bodu.Financial.ExchangeRates.Rba 0.7.1
- Source
- RbaEraWorkbook.cs
Identifies one of the date-range files in which the Reserve Bank of Australia publishes its historical daily exchange rates.
public sealed class RbaEraWorkbook
- Inheritance
-
RbaEraWorkbook
- Inherited Members
- Extension Methods
Remarks
The RBA splits its historical daily exchange-rate data into a small set of multi-year files plus an open-ended
"current" file. Each era maps to one downloadable .xls file and the inclusive date range it covers. The
default catalogue is exposed through Default and can be overridden via the provider options if the
RBA changes its file names.
Constructors
RbaEraWorkbook(string, DateOnly, DateOnly?)
Initializes a new instance of the RbaEraWorkbook class.
public RbaEraWorkbook(string label, DateOnly start, DateOnly? end)
Parameters
Properties
Default
Gets the default catalogue of RBA historical daily exchange-rate eras, from 1983 to the current file.
public static IReadOnlyList<RbaEraWorkbook> Default { get; }
Property Value
- IReadOnlyList<RbaEraWorkbook>
The ordered, immutable default era catalogue.
End
Gets the last calendar date the era covers, or null when the era is open-ended.
public DateOnly? End { get; }
Property Value
FileName
Gets the file name of the era's workbook, relative to the provider's base URL.
public string FileName { get; }
Property Value
Label
Gets the era label (for example, 2023-current).
public string Label { get; }
Property Value
- string
The era label.
Start
Gets the first calendar date the era covers.
public DateOnly Start { get; }
Property Value
- DateOnly
The inclusive start date.
Methods
Covers(DateOnly)
Determines whether the era covers the specified date.
public bool Covers(DateOnly date)
Parameters
dateDateOnlyThe date to test.
Returns
ForDate(DateOnly, IReadOnlyList<RbaEraWorkbook>)
Finds the era in eras that covers the specified date.
public static RbaEraWorkbook? ForDate(DateOnly date, IReadOnlyList<RbaEraWorkbook> eras)
Parameters
dateDateOnlyThe date to resolve.
erasIReadOnlyList<RbaEraWorkbook>The era catalogue to search.
Returns
- RbaEraWorkbook
The covering era, or null when no era covers
date.
Exceptions
- ArgumentNullException
Thrown when
erasis null.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |