C# Класс HandCoded.Finance.CalendarRule

A CalendarRule instance contains the data and algorithmic rule necessary to compute the date when a holiday will fall in any appropriate year.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Generate ( Calendar calendar, int year ) : Date

Applies the algorithm defined by the CalendarRule to calculate the date that a holiday falls in the given year using the given Calendar to avoid other non-business dates.

IsApplicable ( int year ) : bool

Determines if the CalendarRule is applicable to the given year.

Защищенные методы

Метод Описание
CalendarRule ( string name, int from, int until ) : System

Constructs a CalendarRule with a given name and applicable year range.

Описание методов

CalendarRule() защищенный Метод

Constructs a CalendarRule with a given name and applicable year range.
protected CalendarRule ( string name, int from, int until ) : System
name string The name of the holiday.
from int The first year in which the holiday occurs.
until int The last year in which the holiday occurs.
Результат System

Generate() публичный абстрактный Метод

Applies the algorithm defined by the CalendarRule to calculate the date that a holiday falls in the given year using the given Calendar to avoid other non-business dates.
public abstract Generate ( Calendar calendar, int year ) : Date
calendar Calendar The used to identify non-business days.
year int The year to generate the holiday for.
Результат Date

IsApplicable() публичный Метод

Determines if the CalendarRule is applicable to the given year.
public IsApplicable ( int year ) : bool
year int The year to be tested.
Результат bool