Class DateTimeInterval
Represents date time duration in days and/or months.
Inheritance
Namespace: Telerik.Windows.Controls.ScheduleView
Assembly: Telerik.Windows.Controls.ScheduleView.dll
Syntax
public sealed class DateTimeInterval : ValueType, IEquatable<DateTimeInterval>
Constructors
DateTimeInterval(Int32, Int32)
Initializes a new instance of the Date
Declaration
public DateTimeInterval(int days, int months)
Parameters
System. The days. |
System. The months. |
DateTimeInterval(Int32, Int32, Int32)
Initializes a new instance of the Date
Declaration
public DateTimeInterval(int days, int months, int weeks)
Parameters
System. The days. |
System. The months. |
System. The weeks. |
DateTimeInterval(Int32, Int32, Int32, Int32)
Initializes a new instance of the Date
Declaration
public DateTimeInterval(int hours, int days, int months, int weeks)
Parameters
System. The hours. |
System. The days. |
System. The months. |
System. The weeks. |
DateTimeInterval(Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of the Date
Declaration
public DateTimeInterval(int minutes, int hours, int days, int months, int weeks)
Parameters
System. The minutes. |
System. The hours. |
System. The days. |
System. The months. |
System. The weeks. |
Fields
Zero
Identifies Date
Declaration
public static readonly DateTimeInterval Zero
Field Value
Properties
Days
Gets the days.
Declaration
public int Days { get; }
Property Value
System. The days. |
Hours
Gets the hours.
Declaration
public int Hours { get; }
Property Value
System. The hours. |
Minutes
Gets the minutes.
Declaration
public int Minutes { get; }
Property Value
System. The minutes. |
Months
Gets the months.
Declaration
public int Months { get; }
Property Value
System. The months. |
Methods
ConvertToTimeSpan(DateTimeInterval)
Converts the given DateTimeInterval to TimeSpan.
Declaration
public static TimeSpan ConvertToTimeSpan(DateTimeInterval interval)
Parameters
Date DateTimeInterval. |
Returns
System. TimeSpan. |
Equals(Object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
System. Another object to compare to. |
Returns
System. True if |
Equals(DateTimeInterval)
Indicates whether this instance and a specified Date
Declaration
public bool Equals(DateTimeInterval other)
Parameters
Date Another Date |
Returns
System. True if |
FromDays(Int32)
Creates a new Datedays
.
Declaration
public static DateTimeInterval FromDays(int days)
Parameters
System. The days, which will be used to initialize the Date |
Returns
Date A new Date |
FromMonths(Int32)
Creates a new Datemonths
.
Declaration
public static DateTimeInterval FromMonths(int months)
Parameters
System. The months, which will be used to initialize the Date |
Returns
Date A new Date |
GetApproximateTotalDays(Calendar)
Gets the approximate total days count for the specified calendar
.
Uses System.
Declaration
public int GetApproximateTotalDays(Calendar calendar)
Parameters
System. The calendar object. |
Returns
System. Total days that this Date |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
System. A 32-bit signed integer that is the hash code for this instance. |
Parse(String)
Constructs a new Date12d 12m
.
Declaration
public static DateTimeInterval Parse(string value)
Parameters
System. A string that specifies the interval. |
Returns
Date A Date |
Exceptions
System.
|
System.
|
System.
|
System. Given values for Days or Months in |
TryParse(String, out DateTimeInterval)
Constructs a new Date12d 12m
.
Declaration
public static bool TryParse(string value, out DateTimeInterval interval)
Parameters
System. A string that specifies the interval. |
Date The Date |
Returns
Operators
Equality(DateTimeInterval, DateTimeInterval)
Implements the operator ==.
Declaration
public static bool operator ==(DateTimeInterval self, DateTimeInterval other)
Parameters
Date The self. |
Date The other. |
Returns
System. The result of the operator. |
Inequality(DateTimeInterval, DateTimeInterval)
Implements the operator !=.
Declaration
public static bool operator !=(DateTimeInterval self, DateTimeInterval other)
Parameters
Date The self. |
Date The other. |
Returns
System. True if |