Method | Description | |
---|---|---|
CountWeekdays ( this startTime, System.DateTime endTime ) : int |
Counts the number of weekdays between two dates.
|
|
CountWeekends ( this startTime, System.DateTime endTime ) : int |
Counts the number of weekends between two dates.
|
|
DaysAgo ( this days ) : System.DateTime |
Returns a date in the past by days.
|
|
DaysFromNow ( this days ) : System.DateTime |
Returns a date in the future by days.
|
|
Diff ( this dateOne, System.DateTime dateTwo ) : System.TimeSpan |
Diffs the specified date.
|
|
DiffDays ( this dateOne, System.DateTime dateTwo ) : double |
Returns a double indicating the number of days between two dates (past is negative)
|
|
DiffDays ( this dateOne, string dateTwo ) : double |
Returns a double indicating the number of days between two dates (past is negative)
|
|
DiffHours ( this dateOne, System.DateTime dateTwo ) : double |
Returns a double indicating the number of days between two dates (past is negative)
|
|
DiffHours ( this dateOne, string dateTwo ) : double |
Returns a double indicating the number of days between two dates (past is negative)
|
|
DiffMinutes ( this dateOne, System.DateTime dateTwo ) : double |
Returns a double indicating the number of days between two dates (past is negative)
|
|
DiffMinutes ( this dateOne, string dateTwo ) : double |
Returns a double indicating the number of days between two dates (past is negative)
|
|
GetDateDayWithSuffix ( this date ) : string |
Given a datetime object, returns the formatted day, "15th"
|
|
GetFormattedMonthAndDay ( this date ) : string |
Given a datetime object, returns the formatted month and day, i.e. "April 15th"
|
|
HoursAgo ( this hours ) : System.DateTime |
Returns a date in the past by hours.
|
|
HoursFromNow ( this hours ) : System.DateTime |
Returns a date in the future by hours.
|
|
IsDate ( this dt ) : bool |
Verifies if the object is a date
|
|
IsWeekDay ( this dt ) : bool |
Checks to see if the date is a week day (Mon - Fri)
|
|
IsWeekEnd ( this dt ) : bool |
Checks to see if the date is Saturday or Sunday
|
|
MinutesAgo ( this minutes ) : System.DateTime |
Returns a date in the past by minutes
|
|
MinutesFromNow ( this minutes ) : System.DateTime |
Returns a date in the future by minutes.
|
|
ReadableDiff ( this startTime, System.DateTime endTime ) : string |
Displays the difference in time between the two dates. Return example is "12 years 4 months 24 days 8 hours 33 minutes 5 seconds"
|
|
SecondsAgo ( this seconds ) : System.DateTime |
Gets a date in the past according to seconds
|
|
SecondsFromNow ( this seconds ) : System.DateTime |
Gets a date in the future by seconds.
|
|
TimeDiff ( this startTime, System.DateTime endTime ) : string |
Displays the difference in time between the two dates. Return example is "12 years 4 months 24 days 8 hours 33 minutes 5 seconds"
|
Method | Description | |
---|---|---|
FormatString ( this str, string previousStr, int t ) : string |
Remove leading strings with zeros and adjust for singular/plural
|
|
GetSuffix ( int dayNumber ) : string |
public static CountWeekdays ( this startTime, System.DateTime endTime ) : int | ||
startTime | this | The start time. |
endTime | System.DateTime | The end time. |
return | int |
public static CountWeekends ( this startTime, System.DateTime endTime ) : int | ||
startTime | this | The start time. |
endTime | System.DateTime | The end time. |
return | int |
public static DaysAgo ( this days ) : System.DateTime | ||
days | this | The days. |
return | System.DateTime |
public static DaysFromNow ( this days ) : System.DateTime | ||
days | this | The days. |
return | System.DateTime |
public static Diff ( this dateOne, System.DateTime dateTwo ) : System.TimeSpan | ||
dateOne | this | The date one. |
dateTwo | System.DateTime | The date two. |
return | System.TimeSpan |
public static DiffDays ( this dateOne, System.DateTime dateTwo ) : double | ||
dateOne | this | The date one. |
dateTwo | System.DateTime | The date two. |
return | double |
public static DiffDays ( this dateOne, string dateTwo ) : double | ||
dateOne | this | The date one. |
dateTwo | string | The date two. |
return | double |
public static DiffHours ( this dateOne, System.DateTime dateTwo ) : double | ||
dateOne | this | The date one. |
dateTwo | System.DateTime | The date two. |
return | double |
public static DiffHours ( this dateOne, string dateTwo ) : double | ||
dateOne | this | The date one. |
dateTwo | string | The date two. |
return | double |
public static DiffMinutes ( this dateOne, System.DateTime dateTwo ) : double | ||
dateOne | this | The date one. |
dateTwo | System.DateTime | The date two. |
return | double |
public static DiffMinutes ( this dateOne, string dateTwo ) : double | ||
dateOne | this | The date one. |
dateTwo | string | The date two. |
return | double |
public static GetDateDayWithSuffix ( this date ) : string | ||
date | this | The date to extract the string from |
return | string |
public static GetFormattedMonthAndDay ( this date ) : string | ||
date | this | The date to extract the string from |
return | string |
public static HoursAgo ( this hours ) : System.DateTime | ||
hours | this | The hours. |
return | System.DateTime |
public static HoursFromNow ( this hours ) : System.DateTime | ||
hours | this | The hours. |
return | System.DateTime |
public static IsWeekDay ( this dt ) : bool | ||
dt | this | The dt. |
return | bool |
public static IsWeekEnd ( this dt ) : bool | ||
dt | this | The dt. |
return | bool |
public static MinutesAgo ( this minutes ) : System.DateTime | ||
minutes | this | The minutes. |
return | System.DateTime |
public static MinutesFromNow ( this minutes ) : System.DateTime | ||
minutes | this | The minutes. |
return | System.DateTime |
public static ReadableDiff ( this startTime, System.DateTime endTime ) : string | ||
startTime | this | The start time. |
endTime | System.DateTime | The end time. |
return | string |
public static SecondsAgo ( this seconds ) : System.DateTime | ||
seconds | this | The seconds. |
return | System.DateTime |
public static SecondsFromNow ( this seconds ) : System.DateTime | ||
seconds | this | The seconds. |
return | System.DateTime |
public static TimeDiff ( this startTime, System.DateTime endTime ) : string | ||
startTime | this | The start time. |
endTime | System.DateTime | The end time. |
return | string |