DateTimeGroup Struct
Represents a group of DateTimes.
Each DateTime instance that has the same date/time components (year, month, day, hour, minute, second) as this DateTime up to Level belongs to this group.
Instance of DateTimeGroup can be inserted into Values collection to enable filtering DateTime values.
public struct DateTimeGroup : IEquatable<DateTimeGroup>
Public Structure DateTimeGroup
Implements IEquatable(Of DateTimeGroup)
Implements
Constructors
DateTimeGroup(Int32)
Initializes a new instance of the DateTimeGroup type with Year level.
Parameters
year
- System.Int32
The year.
DateTimeGroup(Int32, Int32)
Initializes a new instance of the DateTimeGroup type with Month level.
Parameters
year
- System.Int32
The year.
month
- System.Int32
The month.
DateTimeGroup(Int32, Int32, Int32)
Initializes a new instance of the DateTimeGroup type with Day level.
public DateTimeGroup(int year, int month, int day)
Public Sub New(year As Integer, month As Integer, day As Integer)
Parameters
year
- System.Int32
The year.
month
- System.Int32
The month.
day
- System.Int32
The day.
DateTimeGroup(Int32, Int32, Int32, Int32)
Initializes a new instance of the DateTimeGroup type with Hour level.
public DateTimeGroup(int year, int month, int day, int hour)
Public Sub New(year As Integer, month As Integer, day As Integer, hour As Integer)
Parameters
year
- System.Int32
The year.
month
- System.Int32
The month.
day
- System.Int32
The day.
hour
- System.Int32
The hour.
DateTimeGroup(Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of the DateTimeGroup type with Minute level.
public DateTimeGroup(int year, int month, int day, int hour, int minute)
Public Sub New(year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer)
Parameters
year
- System.Int32
The year.
month
- System.Int32
The month.
day
- System.Int32
The day.
hour
- System.Int32
The hour.
minute
- System.Int32
The minute.
DateTimeGroup(Int32, Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of the DateTimeGroup type with Second level.
public DateTimeGroup(int year, int month, int day, int hour, int minute, int second)
Public Sub New(year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer)
Parameters
year
- System.Int32
The year.
month
- System.Int32
The month.
day
- System.Int32
The day.
hour
- System.Int32
The hour.
minute
- System.Int32
The minute.
second
- System.Int32
The second.
Properties
DateTime
Gets the date/time of this DateTimeGroup.
Valid date/time components are only those upon to Level.
Property Value
- System.DateTime
The date/time of this DateTimeGroup.
Level
Gets the grouping level of this DateTimeGroup.
public readonly DateTimeGroupLevel Level { get; }
Public ReadOnly Property Level As DateTimeGroupLevel
Property Value
The grouping level of this DateTimeGroup.
Methods
Equals(DateTimeGroup)
Determines whether the other
DateTimeGroup is equal to this DateTimeGroup instance.
public bool Equals(DateTimeGroup other)
Public Function Equals(other As DateTimeGroup) As Boolean
Parameters
other
- DateTimeGroup
The other DateTimeGroup to compare with this DateTimeGroup instance.
Returns
- System.Boolean
true if the other
DateTimeGroup is equal to this DateTimeGroup instance; otherwise, false.
Equals(Object)
Determines whether the specified System.Object is equal to this DateTimeGroup instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this DateTimeGroup instance.
Returns
- System.Boolean
true if the specified System.Object is a DateTimeGroup and is equal to this DateTimeGroup instance; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for this DateTimeGroup instance.
Returns
- System.Int32
An integer value that specifies a hash value for this DateTimeGroup instance.
Overrides
ToString()
Returns a System.String that represents this DateTimeGroup instance.
Returns
- System.String
A System.String that represents this DateTimeGroup instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).
Operators
Equality(DateTimeGroup, DateTimeGroup)
Determines whether first
and second
DateTimeGroups are equal.
public static bool operator ==(DateTimeGroup first, DateTimeGroup second)
Public Shared Operator =(first As DateTimeGroup, second As DateTimeGroup) As Boolean
Parameters
first
- DateTimeGroup
The first DateTimeGroup.
second
- DateTimeGroup
The second DateTimeGroup.
Returns
- System.Boolean
true if first
and second
DateTimeGroups are equal; otherwise, false.
Inequality(DateTimeGroup, DateTimeGroup)
Determines whether first
and second
DateTimeGroups are not equal.
public static bool operator !=(DateTimeGroup first, DateTimeGroup second)
Public Shared Operator <>(first As DateTimeGroup, second As DateTimeGroup) As Boolean
Parameters
first
- DateTimeGroup
The first DateTimeGroup.
second
- DateTimeGroup
The second DateTimeGroup.
Returns
- System.Boolean
true if first
and second
DateTimeGroups are not equal; otherwise, false.