C# Class 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.
Datei anzeigen Open project: formicary/fpml-toolkit-csharp Class Usage Examples

Public Methods

Method Description
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.

Protected Methods

Method Description
CalendarRule ( string name, int from, int until ) : System

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

Method Details

CalendarRule() protected method

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.
return System

Generate() public abstract method

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.
return Date

IsApplicable() public method

Determines if the CalendarRule is applicable to the given year.
public IsApplicable ( int year ) : bool
year int The year to be tested.
return bool