DateExtensions Class

Contains custom extension methods to use with DateTime type.

Definition

Namespace: DevCase.Extensions.DateExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[HideModuleNameAttribute]
public sealed class DateExtensions
Inheritance
Object    DateExtensions

Methods

AddWeeks Returns a new DateTime that adds the specified number of weeks to the value of this instance.
DaysInMonth Returns the number of days in the month for the date represented by the specified DateTime.
ElapsedFromNow Returns the elapsed time between the date represented by the specified DateTime and the current date and time.
Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
FirstDayOfMonth Returns a DateTime representing the first day of the month for the date represented by the specified DateTime.
FirstDayOfWeek(DateTime) Returns a DateTime which represents the first day of the week of the date represented by the specified DateTime.
FirstDayOfWeek(DateTime, DayOfWeek) Returns a DateTime which represents the first day of the week of the date represented by the specified DateTime.
FirstDayOfYear Returns a DateTime representing the first day of the year for the date represented by the specified DateTime.
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetTimeStamp Gets the time stamp of the source specified DateTime, in ISO 8601 format.
GetType Gets the Type of the current instance.
(Inherited from Object)
IsFutureTime Determines whether the specified DateTime is in the future time from now.
IsNow Determines whether the specified DateTime is now.
IsPastTime Determines whether the specified DateTime is in the past time from now.
IsToday Determines whether the specified DateTime is today.
IsTomorrow Determines whether the specified DateTime is tomorrow.
IsYesterday Determines whether the specified DateTime is tomorrow.
LastDayOfMonth Returns a DateTime representing the last day of the month for the date represented by the specified DateTime.
LastDayOfWeek(DateTime) Returns a DateTime which represents the last day of the week of the date represented by the specified DateTime.
LastDayOfWeek(DateTime, DayOfWeek) Returns a DateTime which represents the last day of the week of the date represented by the specified DateTime.
LastDayOfYear Returns a DateTime representing the last day of the year for the date represented by the specified DateTime.
ToString Returns a string that represents the current object.
(Inherited from Object)

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)

See Also