C# Class Itenso.TimePeriodDemo.CommunitySamples

ファイルを表示 Open project: jwg4/date-difference

Public Methods

Method Description
AddBusinessDays1 ( System.DateTime startDate, int noOfBusinessDays ) : System.DateTime
AddBusinessDays2 ( System.DateTime startDate, int noOfBusinessDays ) : System.DateTime
AddBusinessDays3 ( System.DateTime startDate, int noOfBusinessDays ) : System.DateTime
CalcWorkingPeriod ( System.DateTime start, System.DateTime end, ITimePeriodCollection excludePeriods = null ) : System.TimeSpan
CalculateBusinessHours ( CalendarTimeRange testPeriod, ITimePeriodCollection holidays = null ) : double
CountMonthDays ( System.DateTime start, System.DateTime end ) : int>.Dictionary
CountWorkingDays ( System.DateTime start, System.DateTime end, IList workingDays ) : int
GetDayOfLastQuarterMonth ( DayOfWeek dayOfWeek, int count ) : DateTime?
GetTimeSpanDescription ( System.DateTime moment, System.TimeSpan timeSpan, int precision = int.MaxValue ) : string
GetTimeSpanDescription ( System.TimeSpan timeSpan, int precision = int.MaxValue ) : string
IsWeekRecuringDay ( System.DateTime start, System.DateTime test, int recuringInterval ) : bool
NetworkDays ( System.DateTime start, System.DateTime end, IEnumerable holidays = null, ITimePeriodCollection holidayPeriods = null ) : double
PrintAge ( System.DateTime birthDate, System.DateTime moment ) : void
ShowMonthNameInfo ( DateTimeFormatInfo info, int month ) : void

Private Methods

Method Description
AddBusinessDaysSample ( ) : void
AddBusinessDaysSample2 ( ) : void
AddWeekDaySample ( ) : void
BusinessHoursSample1 ( ) : void
BusinessHoursSample2 ( ) : void
CalcInvolvedWeekCount ( System.DateTime date1, System.DateTime date2, DayOfWeek firstDayOfWeek ) : int
CalcTargetMoment ( ICollection periods, System.TimeSpan duration ) : DateTime?
CalcTargetMoment2 ( ICollection periods, System.TimeSpan duration ) : DateTime?
CalcWeekCount ( System.DateTime startDateTime, System.DateTime endDateTime ) : int
CalculateAgeSamples ( ) : void
CalculateBusinessHours ( ITimePeriod timePeriod ) : double
CalculateBusinessHoursSample ( ) : void
CalendarDateDiffDayHourSample ( ) : void
CalendarDateDiffHourSample ( ) : void
CalendarWeekSample ( ) : void
CheckDateBetweenDatesSample ( ) : void
CheckDayOfLastQuarterMonth ( ) : void
CombinedPeriodsSample ( ) : void
CommonIntersectionSample ( ) : void
CountDaysByMonthSample ( ) : void
CountWorkingDaysSample ( ) : void
CustomWeekSample ( ) : void
DateTimeOffsetSample ( ) : void
DateTimeSetSample ( ) : void
DaysOfWeekSample ( ) : void
DurationDescriptionSample ( ) : void
FindRemainigYearFridaysSample ( ) : void
FiscalYearWeekCountSample ( ) : void
GetCommonIntersection ( ITimePeriodCollection periods ) : ITimePeriod
GetDayOfCurrentWeek ( DayOfWeek dayOfWeek ) : System.DateTime
GetDayOfCurrentWeek ( ) : void
InvolvedWeekCount ( ) : void
IsLastDayOfMonth ( System.DateTime test ) : bool
IsLastWorkingDayOfMonth ( System.DateTime test ) : bool
LastDayInMonthSample ( ) : void
LastDayOfMonth ( int year, int month ) : System.DateTime
MonthNameSample ( ) : void
NetworkDaysSample ( ) : void
QuarterSample ( ) : void
TimeFormatterSample ( ) : void
TimeGapPrecisionSample ( ) : void
TimeLineMomentSample ( ) : void
TimeLinePeriodsSample ( ) : void
TimePeriodSubtractorSample ( ) : void
UserFriendlyTimeSpanSample ( ) : void
WeekCountSample ( ) : void
WeekCultureSample ( ) : void
WeekDaysSample ( ) : void
WeekRepeatSample ( ) : void
WeekStartEndSample ( ) : void
WorkingHourSum ( ) : void
WorkingPeriodSample ( ) : void
YearDiff ( System.DateTime date1, System.DateTime date2 ) : int
YearDiff ( System.DateTime date1, System.DateTime date2, Calendar calendar ) : int

Method Details

AddBusinessDays1() public method

public AddBusinessDays1 ( System.DateTime startDate, int noOfBusinessDays ) : System.DateTime
startDate System.DateTime
noOfBusinessDays int
return System.DateTime

AddBusinessDays2() public method

public AddBusinessDays2 ( System.DateTime startDate, int noOfBusinessDays ) : System.DateTime
startDate System.DateTime
noOfBusinessDays int
return System.DateTime

AddBusinessDays3() public method

public AddBusinessDays3 ( System.DateTime startDate, int noOfBusinessDays ) : System.DateTime
startDate System.DateTime
noOfBusinessDays int
return System.DateTime

CalcWorkingPeriod() public method

public CalcWorkingPeriod ( System.DateTime start, System.DateTime end, ITimePeriodCollection excludePeriods = null ) : System.TimeSpan
start System.DateTime
end System.DateTime
excludePeriods ITimePeriodCollection
return System.TimeSpan

CalculateBusinessHours() public method

public CalculateBusinessHours ( CalendarTimeRange testPeriod, ITimePeriodCollection holidays = null ) : double
testPeriod Itenso.TimePeriod.CalendarTimeRange
holidays ITimePeriodCollection
return double

CountMonthDays() public method

public CountMonthDays ( System.DateTime start, System.DateTime end ) : int>.Dictionary
start System.DateTime
end System.DateTime
return int>.Dictionary

CountWorkingDays() public method

public CountWorkingDays ( System.DateTime start, System.DateTime end, IList workingDays ) : int
start System.DateTime
end System.DateTime
workingDays IList
return int

GetDayOfLastQuarterMonth() public method

public GetDayOfLastQuarterMonth ( DayOfWeek dayOfWeek, int count ) : DateTime?
dayOfWeek DayOfWeek
count int
return DateTime?

GetTimeSpanDescription() public method

public GetTimeSpanDescription ( System.DateTime moment, System.TimeSpan timeSpan, int precision = int.MaxValue ) : string
moment System.DateTime
timeSpan System.TimeSpan
precision int
return string

GetTimeSpanDescription() public method

public GetTimeSpanDescription ( System.TimeSpan timeSpan, int precision = int.MaxValue ) : string
timeSpan System.TimeSpan
precision int
return string

IsWeekRecuringDay() public method

public IsWeekRecuringDay ( System.DateTime start, System.DateTime test, int recuringInterval ) : bool
start System.DateTime
test System.DateTime
recuringInterval int
return bool

NetworkDays() public method

public NetworkDays ( System.DateTime start, System.DateTime end, IEnumerable holidays = null, ITimePeriodCollection holidayPeriods = null ) : double
start System.DateTime
end System.DateTime
holidays IEnumerable
holidayPeriods ITimePeriodCollection
return double

PrintAge() public method

public PrintAge ( System.DateTime birthDate, System.DateTime moment ) : void
birthDate System.DateTime
moment System.DateTime
return void

ShowMonthNameInfo() public method

public ShowMonthNameInfo ( DateTimeFormatInfo info, int month ) : void
info System.Globalization.DateTimeFormatInfo
month int
return void