CBusinessDay Class ReferenceDeveloped By : Gaurang Desai.
More...
List of all members.
|
Static Public Member Functions |
| static double | CalculateBDay (DateTime startDate, DateTime EndDate, int NoOfDayWeek, int DayType) |
| | Calulates Business Days within the given range of days. Start date and End date inclusive. Note : Startdate is Exclusive.
|
| static string | Age (DateTime DOB, DateTime OnDate) |
| | Calculate Age on given date. Calculates as Years, Months and Days and return as concatenated string.
|
| static int | GetWeeks (DateTime stdate, DateTime eddate) |
| | Calculate weeks between starting date and ending date.
|
| static double | DateDiff (string datePart, DateTime startDate, DateTime endDate) |
| | Mimic the Implementation of DateDiff function of VB.Net. Note : Number of Year/Month is calculated as how many times you have crossed the boundry. e.g. if you say starting date is 29/01/2005 and 01/02/2005 the year will be 0,month will be 1.
|
| static int | GetDayOfWeekOccurrenceThisMonth (DateTime dt) |
| | Occurrence of the day of week this month.
|
| static bool | IsLastDayOfWeekOccurrenceThisMonth (DateTime dt) |
| | Is last day of week occurrence this month.
|
Detailed Description
Developed By : Gaurang Desai.
Created On : 29th May, 2005
Class Library that contains, Most Usefull function related to DateTime manipulation. Used DateTime and TimeSpan class. All functions are Static and so the Class in Sealed.
Member Function Documentation
| static string Age |
( |
DateTime |
DOB, |
|
|
DateTime |
OnDate |
|
) |
[static] |
|
|
|
Calculate Age on given date. Calculates as Years, Months and Days and return as concatenated string.
- Parameters:
-
| DOB | Datetime object containing DOB value |
| OnDate | Datetime object containing given date, for which we need to calculate the age |
- Returns:
|
| static double CalculateBDay |
( |
DateTime |
startDate, |
|
|
DateTime |
EndDate, |
|
|
int |
NoOfDayWeek, |
|
|
int |
DayType |
|
) |
[static] |
|
|
|
Calulates Business Days within the given range of days. Start date and End date inclusive. Note : Startdate is Exclusive.
- Parameters:
-
| startDate | Datetime object containing Starting Date |
| EndDate | Datetime object containing End Date |
| NoOfDayWeek | integer denoting No of Business Day in a week |
| DayType | DayType=0 for Business Day and DayType=1 for WeekEnds |
- Returns:
|
| static double DateDiff |
( |
string |
datePart, |
|
|
DateTime |
startDate, |
|
|
DateTime |
endDate |
|
) |
[static] |
|
|
|
Mimic the Implementation of DateDiff function of VB.Net. Note : Number of Year/Month is calculated as how many times you have crossed the boundry. e.g. if you say starting date is 29/01/2005 and 01/02/2005 the year will be 0,month will be 1.
- Parameters:
-
| datePart | specifies on which part of the date to calculate the difference |
| startDate | Datetime object containing the beginning date for the calculation |
| endDate | Datetime object containing the ending date for the calculation |
- Returns:
|
| static int GetDayOfWeekOccurrenceThisMonth |
( |
DateTime |
dt |
) |
[static] |
|
|
|
Occurrence of the day of week this month.
- Parameters:
-
- Returns:
|
| static int GetWeeks |
( |
DateTime |
stdate, |
|
|
DateTime |
eddate |
|
) |
[static] |
|
|
|
Calculate weeks between starting date and ending date.
- Parameters:
-
- Returns:
|
| static bool IsLastDayOfWeekOccurrenceThisMonth |
( |
DateTime |
dt |
) |
[static] |
|
|
|
Is last day of week occurrence this month.
- Parameters:
-
- Returns:
|
The documentation for this class was generated from the following file:
|