Struct DateRange
Namespace: Aspose.Medical.Dicom.Elements
Assembly: Aspose.Medical.dll (25.11.0)
Encapsulates Date (Time, Date Time) Range Matching functionality. See specification https://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.2.2.2.5.html#sect_C.2.2.2.5.3
C.2.2.2.5.1 Range Matching of Attributes of VR of DA.a. A string of the form "`date1` - `date2`", where `date1` is less or equal to `date2`, shall match all occurrences of dates that fall between `date1` and `date2` inclusiveb. A string of the form "- `date1`" shall match all occurrences of dates prior to and including `date1`c. A string of the form "`date1` -" shall match all occurrences of `date1` and subsequent datesC.2.2.2.5.2 Range Matching of Attributes of VR of TM.a. A string of the form "`time1` - `time2`", where `time1` is less or equal to `time2`, shall match all occurrences of times that fall between `time1` and `time2` inclusiveb. A string of the form "- `time1`" shall match all occurrences of times prior to and including `time1`c. A string of the form "`time1` -" shall match all occurrences of `time1` and subsequent timesC.2.2.2.5.3 Range Matching of Attributes of VR of DT.a. A string of the form "`datetime1` - `datetime2`", where `datetime` is less or equal to `datetime2`, shall match all moments in time that fall between `datetime1` and `datetime2` inclusiveb. A string of the form "- `datetime1`" shall match all moments in time prior to and including `datetime1`c. A string of the form "`datetime1` -" shall match all moments in time subsequent to and including `datetime1`d. The offset from Universal Coordinated Time, if present in the Value of the Attribute, shall be taken into account for the purposes of the match.C.2.2.2.5.4 Range Matching General RulesIf Extended Negotiation of combined datetime matching is successful, then a pair of Attributes that are of VR DA and TM, both of which specify the same form of Range Matching, shall have the concatenated string values of each Range Matching component matched as if they were a single Attribute of VR DT.public struct DateRange : IEquatable<daterange>Implements
Inherited Members
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
DateRange()
Creates a default instance of the Aspose.Medical.Dicom.Elements.DateRange staring from System.DateTime.MinValue till System.DateTime.MaxValue.
public DateRange()Fields
Default
The default value of the date range staring from System.DateTime.MinValue till System.DateTime.MaxValue .
public static readonly DateRange DefaultField Value
Properties
Maximum
Maximum value in a range, inclusive. If not specified, then shall match all moments prior to and including Aspose.Medical.Dicom.Elements.DateRange.Minimum. Read / Write Aspose.Medical.Dicom.Elements.DateTime.
public DateTime Maximum { readonly get; set; }Property Value
Minimum
Minimum value in a range, inclusive. If not specified, then shall match all moments subsequent to and including Aspose.Medical.Dicom.Elements.DateRange.Maximum. Read / Write Aspose.Medical.Dicom.Elements.DateTime.
public DateTime Minimum { readonly get; set; }Property Value
Methods
Equals(DateRange)
public readonly bool Equals(DateRange other)Parameters
other DateRange
Returns
Equals(object?)
public override readonly bool Equals(object? obj)Parameters
obj object
?
Returns
GetHashCode()
public override readonly int GetHashCode()Returns
ToString()
public override readonly string ToString()Returns
Exceptions
Unable to format one of the date range components.
TryParseExact(string, string[], IFormatProvider, DateTimeStyles, out DateRange)
Converts the specified string representation of a date range to its Aspose.Medical.Dicom.Elements.DateRange equivalent.
public static bool TryParseExact(string input, string[] formats, IFormatProvider provider, DateTimeStyles style, out DateRange result)Parameters
input string
The string containing the range to parse.
formats string
[]
An array of allowable formats of input.
provider IFormatProvider
An object that supplies culture-specific formatting information about input.
style DateTimeStyles
A bitwise combination of enumeration values that defines how to interpret the parsed date in relation to the current time zone or the current date. A typical value to specify is System.Globalization.DateTimeStyles.None.
result DateRange
When this method returns, contains the Aspose.Medical.Dicom.Elements.DateRange value equivalent to the date range contained in
input,
if the conversion succeeded, or Aspose.Medical.Dicom.Elements.DateRange.Default if the conversion failed.
The conversion fails if the input parameter is null, is
System.String.Empty,
or does not contain a valid string representation of a date range.
This parameter is passed uninitialized.
Returns
true if the s parameter was converted successfully; otherwise, false.
Operators
operator ==(DateRange, DateRange)
Determines whether two specified ranges have the same value.
public static bool operator ==(DateRange left, DateRange right)Parameters
left DateRange
The first range to compare.
right DateRange
The second range to compare.
Returns
true if the value of left is the same as the value of right;
otherwise, false.
operator !=(DateRange, DateRange)
Determines whether two specified ranges have different values.
public static bool operator !=(DateRange left, DateRange right)Parameters
left DateRange
The first range to compare.
right DateRange
The second range to compare.
Returns
true if the value of left is different from the value of
right;
otherwise, false.
</daterange>