Class EbicsDateRange
Holds an EBICS DateRange element.
public class EbicsDateRange : EbicsElement
- Inheritance
-
EbicsDateRange
- Inherited Members
Constructors
EbicsDateRange()
Creates an empty date range.
public EbicsDateRange()
EbicsDateRange(DateTime, DateTime)
Creates a particular date range.
public EbicsDateRange(DateTime tStart, DateTime tEnd)
Parameters
tStart
DateTimeThe desired start date or
DateTime.MinValue
to indicate that no start date shall be set. Only theDate
of this parameter will be used, the time portion is ignored.tEnd
DateTimeThe desired end date or
DateTime.MinValue
to indicate that no end date shall be set. The valueDateTime.MaxValue
should not be used here. Only theDate
of this parameter will be used, the time portion is ignored.
Exceptions
- ArgumentException
Thrown if the given date range is invalid.
Properties
DateRangeEnd
Optional end of a requested date range.
public DateTime DateRangeEnd { get; }
Property Value
- DateTime
The value
DateTime.MinValue
indicates that no end date is set.
DateRangeStart
Optional start of a requested date range.
public DateTime DateRangeStart { get; }
Property Value
- DateTime
The value DateTime.MinValue indicates that no start date is set.
HaveRange
Indicates whether both DateRangeStart and DateRangeEnd
have been set to a value that is not DateTime.MinValue
.
public bool HaveRange { get; }
Property Value
Methods
BuildXml(XmlDocument, EbicsVersion)
public override XmlElement BuildXml(XmlDocument xmlDocument, EbicsVersion nVersion)
Parameters
xmlDocument
XmlDocumentnVersion
EbicsVersion
Returns
IsInRange(DateTime)
Checks whether a given date and time is contained in this date range.
public bool IsInRange(DateTime tDate)
Parameters
tDate
DateTimeThe date and time that shall be checked. The time portion of this parameter is effectively ignored. Also, the
DateTimeKind
is ignored.
Returns
Remarks
The comparison fully ignores theDateTime.Kind
and thus may compare
different time zones wrongly.
ParseXml(XmlElement, EbicsVersion)
public override void ParseXml(XmlElement xmlElement, EbicsVersion nVersion)
Parameters
xmlElement
XmlElementnVersion
EbicsVersion