Class
DateSpanExtensions

Extension methods for IDateSpan interface.

Definition

Namespace:Telerik.Windows.Controls.ScheduleView

Assembly:Telerik.Windows.Controls.ScheduleView.dll

Syntax:

cs-api-definition
public static class DateSpanExtensions

Inheritance: objectDateSpanExtensions

Methods

Contains(IDateSpan, DateTime)

Determines whether DateSpan contains DateTime.

Declaration

cs-api-definition
public static bool Contains(this IDateSpan source, DateTime date)

Parameters

source

IDateSpan

The source.

date

DateTime

The date.

Returns

bool

true if contains date; otherwise, false.

Contains(IDateSpan, IDateSpan)

Determines whether DateSpan contains another DateSpan.

Declaration

cs-api-definition
public static bool Contains(this IDateSpan source, IDateSpan other)

Parameters

source

IDateSpan

The source.

other

IDateSpan

The other.

Returns

bool

true if contains another DateSpan; otherwise, false.

Duration(IDateSpan)

Gets the duration of the specified date span.

Declaration

cs-api-definition
public static TimeSpan Duration(this IDateSpan dateSpan)

Parameters

dateSpan

IDateSpan

The date span.

Returns

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

cs-api-definition
public static bool IntersectsWith(this IDateSpan source, IDateSpan other)

Parameters

source

IDateSpan

The source.

other

IDateSpan

The other.

Returns

bool

Translate(IDateSpan, TimeSpan)

Translates a DateSpan with a specified TimeSpan.

Declaration

cs-api-definition
public static DateSpan Translate(this IDateSpan dateSpan, TimeSpan span)

Parameters

dateSpan

IDateSpan

The DateSpan to be translated.

span

TimeSpan

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

cs-api-definition
public static bool Validate(this IDateSpan dateSpan)

Parameters

dateSpan

IDateSpan

The date span.

Returns

bool