C# 클래스 HandCoded.Finance.Calendar

Calendar instances implement the rules for determining if a Date is a business day in the location it represents.

The rules for public holidays vary from country to country but with the exception of special occaisions (e.g. royal weddings, funerals, etc.) can usually be predicted years in advance.

On first reference this class bootstraps an initial set of Calendar instances by processing a XML data file.
파일 보기 프로젝트 열기: formicary/fpml-toolkit-csharp 1 사용 예제들

공개 메소드들

메소드 설명
ForName ( string name ) : Calendar

If a Calendar with the given name exists in the extent set then a reference to it is returned to the caller.

IsBusinessDay ( Date date ) : bool

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

ToString ( ) : string

Produces a debugging string describing the instance.

보호된 메소드들

메소드 설명
Calendar ( string name ) : System

Constructs a Calendar instance with a given name.

ToDebug ( ) : string

Produces a debugging string describing the state of the instance.

비공개 메소드들

메소드 설명
Calendar ( ) : System

Initialises the Calendar cache by parsing a standard set of definitions held in a XML file distributed with the toolkit.

ConvertMonth ( string name ) : int
ConvertWeekday ( string name ) : int
ConvertWhen ( string name ) : int
ParseCalendars ( string uri ) : void

Parses the XML data file indicated by the URI to extract default sets of calendars.

메소드 상세

Calendar() 보호된 메소드

Constructs a Calendar instance with a given name.
protected Calendar ( string name ) : System
name string The reference name for the instance.
리턴 System

ForName() 공개 정적인 메소드

If a Calendar with the given name exists in the extent set then a reference to it is returned to the caller.
public static ForName ( string name ) : Calendar
name string The required Calendar name.
리턴 Calendar

IsBusinessDay() 공개 추상적인 메소드

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

ToDebug() 보호된 메소드

Produces a debugging string describing the state of the instance.
protected ToDebug ( ) : string
리턴 string

ToString() 공개 메소드

Produces a debugging string describing the instance.
public ToString ( ) : string
리턴 string