Table of Contents

ImfReportMonth Class

Definition

Namespace
Bodu.Financial.ExchangeRates
Assembly
Bodu.Financial.ExchangeRates.Imf.dll
Package
Bodu.Financial.ExchangeRates.Imf 0.7.1
Source
ImfReportMonth.cs

Identifies a single calendar month of the IMF Representative Exchange Rates report, the download unit the ImfRateProvider fetches and caches.

public sealed class ImfReportMonth : IEquatable<ImfReportMonth>
Inheritance
ImfReportMonth
Implements
Inherited Members
Extension Methods

Remarks

The IMF publishes one monthly report covering every reported currency for each business day of the month. A month is therefore the natural download unit: fetching it warms the store for every currency and every business day at once. The report for a closed month is immutable, which the on-disk cache exploits to keep past months indefinitely.

Constructors

ImfReportMonth(int, int)

Initializes a new instance of the ImfReportMonth class.

public ImfReportMonth(int year, int month)

Parameters

year int

The four-digit calendar year.

month int

The calendar month.

Exceptions

ArgumentOutOfRangeException

Thrown when month is not in the range 1 through 12.

Properties

FileName

Gets the cache file name for the month's report.

public string FileName { get; }

Property Value

string

The file name, for example imf_rep_2026-04.tsv.

Key

Gets the coalescing and cache key for the month.

public string Key { get; }

Property Value

string

The month in yyyy-MM form, for example 2026-04.

Month

Gets the calendar month of the report.

public int Month { get; }

Property Value

int

The calendar month, from 1 (January) through 12 (December).

SelectDate

Gets the date used to select the month's report on the IMF endpoint: the last calendar day of the month.

public DateOnly SelectDate { get; }

Property Value

DateOnly

The last day of the report month.

Year

Gets the four-digit calendar year of the report.

public int Year { get; }

Property Value

int

The calendar year.

Methods

Equals(ImfReportMonth?)

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

public bool Equals(ImfReportMonth? other)

Parameters

other ImfReportMonth

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.

Applies to

ProductVersions
.NET8, 10