C# Class HandCoded.Finance.DateRoll

Instances of the DateRoll class carry out financial date adjustments. A DateRoll instance will apply a particular adjustment rule to a given Date using a business day Calendar to skip non-working days.
ファイルを表示 Open project: formicary/fpml-toolkit-csharp Class Usage Examples

Public Properties

Property Type Description
FOLLOWING DateRoll
MODFOLLOWING DateRoll
MODPRECEDING DateRoll
NONE DateRoll
PRECEDING DateRoll
WEEKEND DateRoll

Public Methods

Method Description
Adjust ( Calendar calendar, Date date ) : Date

Adjusts a Date which falls on a holiday within the indicated Calendar to an appropriate business day.

ForName ( string name ) : DateRoll

Attempts to locate a DateRoll instance with the given name.

Protected Methods

Method Description
DateRoll ( string name ) : System

Constructs a DateRoll instance and adds it to the extent set indexed by its symbolic name.

Private Methods

Method Description
Following ( Calendar calendar, Date date ) : Date

Adjusts a Date to the next business day if it falls on a holiday.

ModFollowing ( Calendar calendar, Date date ) : Date

Adjusts a Date to the next business day if it falls on a holiday unless that would move the date into the next month in which case it is rolled to a preceding date.

ModPreceding ( Calendar calendar, Date date ) : Date

Adjusts a Date to the previous business day if it falls on a holiday unless that would move the date into the previous month in which case it is rolled to a following date.

None ( Calendar calendar, Date date ) : Date

A dummy adjustment that performs no change to the date.

Preceding ( Calendar calendar, Date date ) : Date

Adjusts a Date to the preceding business day if it falls on a holiday.

Weekend ( Calendar calendar, Date date ) : Date

Adjusts dates which fall on a Saturday to the preceding Friday, and those falling on a Sunday to the following Monday. This convention is used by some national holidays, for example Christmas Day in the USA.

Method Details

Adjust() public abstract method

Adjusts a Date which falls on a holiday within the indicated Calendar to an appropriate business day.
public abstract Adjust ( Calendar calendar, Date date ) : Date
calendar Calendar The to be used.
date Date The to adjust.
return Date

DateRoll() protected method

Constructs a DateRoll instance and adds it to the extent set indexed by its symbolic name.
protected DateRoll ( string name ) : System
name string The symbolic name for this instance.
return System

ForName() public static method

Attempts to locate a DateRoll instance with the given name.
public static ForName ( string name ) : DateRoll
name string The required DateRoll name.
return DateRoll

Property Details

FOLLOWING public_oe static_oe property

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance FOLLOWING
return DateRoll

MODFOLLOWING public_oe static_oe property

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance MODFOLLOWING
return DateRoll

MODPRECEDING public_oe static_oe property

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance MODPRECEDING
return DateRoll

NONE public_oe static_oe property

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance NONE
return DateRoll

PRECEDING public_oe static_oe property

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance PRECEDING
return DateRoll

WEEKEND public_oe static_oe property

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance WEEKEND
return DateRoll