C# Class HandCoded.Finance.CalendarRule.Offset

The Offset class extends CalendarRule with an understanding of holidays that fall on a day offset from the start of a month (e.g. Thanksgiving in the US).
Inheritance: CalendarRule
Datei anzeigen Open project: formicary/fpml-toolkit-csharp

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.

Offset ( string name, int from, int until, int when, int day, int month ) : System

Constructs an Offset instance that describes a holiday that occurs on a given occurance of a weekday in the specified month.

Method Details

Generate() public 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 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

Offset() public method

Constructs an Offset instance that describes a holiday that occurs on a given occurance of a weekday in the specified month.
public Offset ( string name, int from, int until, int when, int day, int month ) : 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.
when int The occurance of within the month (e.g. first, last).
day int The weekday the holiday falls on.
month int The month the holiday falls in.
return System