C# Class HandCoded.Finance.Weekend

The Weekend class provides a mechanism to test if a Date falls on a weekend (e.g. non-working day). In traditionally Christian countries Saturday and Sunday are non-working but other religions have selected other days.
Afficher le fichier Open project: formicary/fpml-toolkit-csharp Class Usage Examples

Méthodes publiques

Свойство Type Description
FRI_SAT Weekend
SAT_SUN Weekend
THU_FRI Weekend

Méthodes publiques

Méthode Description
ForName ( string name ) : Weekend

Attempts to find a Weekend instance in the extent with the given reference name.

IsWeekend ( Date date ) : bool

Determines if the given Date falls on a weekend.

Méthodes protégées

Méthode Description
Weekend ( string name ) : System

Constructs a Weekend instance with the given name and adds it to the extent set.

Private Methods

Méthode Description
IsFriOrSat ( Date date ) : bool

Tests is a Date falls on a Friday or a Saturday.

IsSatOrSun ( Date date ) : bool

Tests is a Date falls on a Saturday or a Sunday.

IsThuOrFri ( Date date ) : bool

Tests is a Date falls on a Thursday or a Friday.

Method Details

ForName() public static méthode

Attempts to find a Weekend instance in the extent with the given reference name.
public static ForName ( string name ) : Weekend
name string The reference name for the required instance.
Résultat Weekend

IsWeekend() public abstract méthode

Determines if the given Date falls on a weekend.
public abstract IsWeekend ( Date date ) : bool
date Date The to check.
Résultat bool

Weekend() protected méthode

Constructs a Weekend instance with the given name and adds it to the extent set.
protected Weekend ( string name ) : System
name string The name used to reference this instance.
Résultat System

Property Details

FRI_SAT public_oe static_oe property

A Weekend instance that detects Jewish style (Friday & Saturday) weekends.
public static Weekend,HandCoded.Finance FRI_SAT
Résultat Weekend

SAT_SUN public_oe static_oe property

A Weekend instance that detects Christian style (Saturday & Sunday) weekends.
public static Weekend,HandCoded.Finance SAT_SUN
Résultat Weekend

THU_FRI public_oe static_oe property

A Weekend instance that detects Islamic style (Thursday & Friday) weekends.
public static Weekend,HandCoded.Finance THU_FRI
Résultat Weekend