skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DateTimeInterval

Represents a time interval defined by two DateTime values.

Inheritance
System.Object
DateTimeInterval
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll

Syntax

public class DateTimeInterval : INotifyPropertyChanged, IEquatable<DateTimeInterval>, ICloneable

Constructors

DateTimeInterval()

Initializes a new instance of the DateTimeInterval class.

Declaration
public DateTimeInterval()

DateTimeInterval(DateTime, DateTime)

Initializes a new instance of the DateTimeInterval class.

Declaration
public DateTimeInterval(DateTime start, DateTime end)
Parameters
System.DateTime start

The start of the interval.

System.DateTime end

The end of the interval.

DateTimeInterval(DateTime, TimeSpan)

Initializes a new instance of the DateTimeInterval class.

Declaration
public DateTimeInterval(DateTime start, TimeSpan duration)
Parameters
System.DateTime start

The start of the interval.

System.TimeSpan duration

The duration of the interval.

Properties

Duration

Gets or sets the duration of the interval.

Declaration
public virtual TimeSpan Duration { get; set; }
Property Value
System.TimeSpan

The duration of the interval.

Empty

Represents an empty DateTimeInterval value.

Declaration
public static DateTimeInterval Empty { get; }
Property Value
DateTimeInterval

End

Gets or sets the end of the interval.

Declaration
public virtual DateTime End { get; set; }
Property Value
System.DateTime

The end of the interval.

Start

Gets or sets the start the start of the interval.

Declaration
public virtual DateTime Start { get; set; }
Property Value
System.DateTime

The start the interval.

Methods

Clone()

Declaration
public virtual DateTimeInterval Clone()
Returns
DateTimeInterval

Contains(DateTime)

Determines whether the specified date is contained in this interval.

Declaration
public bool Contains(DateTime date)
Parameters
System.DateTime date

The date.

Returns
System.Boolean

true if this interval contains the specified date; otherwise, false.

Contains(DateTimeInterval)

Determines whether this interval contains another interval.

Declaration
public bool Contains(DateTimeInterval other)
Parameters
DateTimeInterval other

The other.

Returns
System.Boolean

true if this inerval contains the other interval; otherwise, false.

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

Overrides
System.Object.Equals(System.Object)

Equals(DateTimeInterval)

Declaration
public bool Equals(DateTimeInterval other)
Parameters
DateTimeInterval other

Returns
System.Boolean

Implements
System.IEquatable<T>.Equals(T)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
System.Int32

Overrides
System.Object.GetHashCode()

IntersectsWith(DateTimeInterval)

Determines whether this interval intersects with the specified interval.

Declaration
public bool IntersectsWith(DateTimeInterval other)
Parameters
DateTimeInterval other

The other interval.

Returns
System.Boolean

IntersectsWithGreaterEnd(DateTimeInterval)

Determines whether this interval intersects with the specified interval.

Declaration
public bool IntersectsWithGreaterEnd(DateTimeInterval other)
Parameters
DateTimeInterval other

The other interval.

Returns
System.Boolean

IsNullOrEmpty(DateTimeInterval)

Determines whether the specified DateTimeInterval is null or empty.

Declaration
public static bool IsNullOrEmpty(DateTimeInterval interval)
Parameters
DateTimeInterval interval

The interval.

Returns
System.Boolean

true if the specified DateTimeInterval is null or empty; otherwise, false.

OnPropertyChanged(String)

Declaration
protected virtual void OnPropertyChanged(string propertyName)
Parameters
System.String propertyName

ToString()

Declaration
public override string ToString()
Returns
System.String

Overrides
System.Object.ToString()

Events

PropertyChanged

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler

Explicit Interface Implementations

ICloneable.Clone()

Declaration
object ICloneable.Clone()
Returns
System.Object

Implements
System.ICloneable.Clone()

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.