C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
FOLLOWING DateRoll
MODFOLLOWING DateRoll
MODPRECEDING DateRoll
NONE DateRoll
PRECEDING DateRoll
WEEKEND DateRoll

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

Метод Описание
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.

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

Метод Описание
DateRoll ( string name ) : System

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

Приватные методы

Метод Описание
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.

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

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

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.
Результат Date

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

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.
Результат System

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

Attempts to locate a DateRoll instance with the given name.
public static ForName ( string name ) : DateRoll
name string The required DateRoll name.
Результат DateRoll

Описание свойств

FOLLOWING публичное статическое свойство

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance FOLLOWING
Результат DateRoll

MODFOLLOWING публичное статическое свойство

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance MODFOLLOWING
Результат DateRoll

MODPRECEDING публичное статическое свойство

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance MODPRECEDING
Результат DateRoll

NONE публичное статическое свойство

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance NONE
Результат DateRoll

PRECEDING публичное статическое свойство

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance PRECEDING
Результат DateRoll

WEEKEND публичное статическое свойство

A DateRoll that performs no adjustment.
public static DateRoll,HandCoded.Finance WEEKEND
Результат DateRoll