C# Class PaulStovell.TrialBalance.DomainModel.Period

This class represents a single period in the accounting cycle.
显示文件 Open project: PaulStovell/trial-balance Class Usage Examples

Public Methods

Method Description
CalculatePeriodForDate ( System.DateTime date, System.DateTime periodStartDate, PeriodLength periodLength ) : Period

Gets the accounting period for a given date.

GetNext ( ) : Period

Gets the next accounting period after this one.

GetPrevious ( ) : Period

Gets the accounting period that came before this one.

IncludesDate ( System.DateTime date ) : bool

Private Methods

Method Description
Period ( ) : System

Constructor.

Method Details

CalculatePeriodForDate() public static method

Gets the accounting period for a given date.
public static CalculatePeriodForDate ( System.DateTime date, System.DateTime periodStartDate, PeriodLength periodLength ) : Period
date System.DateTime The date to find the accounting period for.
periodStartDate System.DateTime A date that an account period starts on.
periodLength PeriodLength The length of accounting periods.
return Period

GetNext() public method

Gets the next accounting period after this one.
public GetNext ( ) : Period
return Period

GetPrevious() public method

Gets the accounting period that came before this one.
public GetPrevious ( ) : Period
return Period

IncludesDate() public method

public IncludesDate ( System.DateTime date ) : bool
date System.DateTime
return bool