Class DateSpanExtensions
Extension methods for IDateSpan interface.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Controls.ScheduleView
Assembly: Telerik.Windows.Controls.ScheduleView.dll
Syntax
public static class DateSpanExtensions
Methods
Contains(IDateSpan, DateTime)
Determines whether DateSpan contains System.DateTime.
Declaration
public static bool Contains(this IDateSpan source, DateTime date)
Parameters
IDateSpan
source
The source. |
System.DateTime
date
The date. |
Returns
System.Boolean
|
Contains(IDateSpan, IDateSpan)
Declaration
public static bool Contains(this IDateSpan source, IDateSpan other)
Parameters
IDateSpan
source
The source. |
IDateSpan
other
The other. |
Returns
System.Boolean
|
Duration(IDateSpan)
Gets the duration of the specified date span.
Declaration
public static TimeSpan Duration(this IDateSpan dateSpan)
Parameters
IDateSpan
dateSpan
The date span. |
Returns
System.TimeSpan
Duration of the date span as distinction of end and start. |
IntersectsWith(IDateSpan, IDateSpan)
Checks whether do two spans intersect with each other or not.
Declaration
public static bool IntersectsWith(this IDateSpan source, IDateSpan other)
Parameters
IDateSpan
source
The source. |
IDateSpan
other
The other. |
Returns
System.Boolean
|
Translate(IDateSpan, TimeSpan)
Translates a DateSpan with a specified TimeSpan.
Declaration
public static DateSpan Translate(this IDateSpan dateSpan, TimeSpan span)
Parameters
IDateSpan
dateSpan
The DateSpan to be translated. |
System.TimeSpan
span
The TimeSpan the DateSpan to be translated with. |
Returns
DateSpan
The translated DateSpan. If we translate "2010/05/05 15:30 - 2010/05/06 15:00" with 03:00 the result will be "2010/05/05 18:30 - 2010/05/06 18:00". |
Validate(IDateSpan)
Validates the specified date span.
Declaration
public static bool Validate(this IDateSpan dateSpan)
Parameters
IDateSpan
dateSpan
The date span. |
Returns
System.Boolean
|