C# Class HandCoded.Finance.RuleBasedCalendar

A RuleBasedCalendar uses a set of CalendarRule instances to derive the dates on which holidays will occur either in the past or the future.
Inheritance: Calendar
Exibir arquivo Open project: formicary/fpml-toolkit-csharp Class Usage Examples

Public Methods

Method Description
AddRule ( CalendarRule rule ) : void

Adds a CalendarRule instance to the set maintained by the current instance.

IsBusinessDay ( Date date ) : bool

Determines if the Date provided falls on a business day in this Calendar (e.g. not a holiday or weekend).

RuleBasedCalendar ( string name, Weekend weekend ) : System

Constructs a RuleBasedCalendar with the given name and Weekend rule.

Private Methods

Method Description
Generate ( int min, int max ) : void

Uses the CalendarRule instances to extend the holiday set for the years specified.

Method Details

AddRule() public method

Adds a CalendarRule instance to the set maintained by the current instance.
public AddRule ( CalendarRule rule ) : void
rule CalendarRule The to be added.
return void

IsBusinessDay() public method

Determines if the Date provided falls on a business day in this Calendar (e.g. not a holiday or weekend).
public IsBusinessDay ( Date date ) : bool
date Date The to be tested.
return bool

RuleBasedCalendar() public method

Constructs a RuleBasedCalendar with the given name and Weekend rule.
public RuleBasedCalendar ( string name, Weekend weekend ) : System
name string
weekend Weekend
return System