XPathDateTime class final
Representation of XPath date and time values (xs:dateTime, xs:dateTimeStamp, xs:date, xs:time, xs:gYearMonth, xs:gYear, xs:gMonthDay, xs:gMonth, and xs:gDay).
- Inheritance
-
- Object
- XPathAtomic
- XPathDateTime
Constructors
- XPathDateTime(int? year, [int? month, int? day, int? hour, int? minute, int? second, int millisecond = 0, int microsecond = 0, int? timezoneOffsetMinutes, XPathType type = xsDateTime])
-
Creates a new XPathDateTime with the given components.
const
- XPathDateTime.date(int year, int month, int day, [int? timezoneOffsetMinutes])
-
Creates a new XPathDateTime representing an xs:date.
const
- XPathDateTime.day(int day, [int? timezoneOffsetMinutes])
-
Creates a new XPathDateTime representing an xs:gDay.
const
- XPathDateTime.fromDateTime(DateTime dateTime, [int? timezoneOffsetMinutes, XPathType type = xsDateTime])
-
Creates a new XPathDateTime from a Dart DateTime object.
factory
- XPathDateTime.fromParts({int? year, int? month, int? day, int? hour, int? minute, int? second, int millisecond = 0, int microsecond = 0, int? timezoneOffsetMinutes, XPathType type = xsDateTime})
-
Creates a new XPathDateTime with named components filtered for the target
type.factory - XPathDateTime.month(int month, [int? timezoneOffsetMinutes])
-
Creates a new XPathDateTime representing an xs:gMonth.
const
- XPathDateTime.monthDay(int month, int day, [int? timezoneOffsetMinutes])
-
Creates a new XPathDateTime representing an xs:gMonthDay.
const
- XPathDateTime.time(int hour, int minute, int second, [int millisecond = 0, int microsecond = 0, int? timezoneOffsetMinutes])
-
Creates a new XPathDateTime representing an xs:time.
const
- XPathDateTime.year(int year, [int? timezoneOffsetMinutes])
-
Creates a new XPathDateTime representing an xs:gYear.
const
- XPathDateTime.yearMonth(int year, int month, [int? timezoneOffsetMinutes])
-
Creates a new XPathDateTime representing an xs:gYearMonth.
const
Properties
- day → int?
-
The day component, if present.
final
- effectiveBooleanValue → bool
-
The effective boolean value (EBV) of this item.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- hour → int?
-
The hour component, if present.
final
- isNumeric → bool
-
Whether this atomic value is numeric.
no setterinherited
- isUtc → bool
-
Whether this date-time has a timezone offset.
no setter
- microsecond → int
-
The microsecond component.
final
- millisecond → int
-
The millisecond component.
final
- minute → int?
-
The minute component, if present.
final
- month → int?
-
The month component, if present.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- second → int?
-
The second component, if present.
final
- stringValue → String
-
Canonical string representation of this item.
no setteroverride
- timezoneOffsetMinutes → int?
-
The timezone offset in minutes, if present.
final
- type → XPathType
-
The XDM type of this item.
final
- utcInstant → DateTime
-
The UTC instant for comparison.
no setter
- value → Object
-
The underlying Dart value representation.
no setteroverride
- year → int?
-
The year component, if present.
final
Methods
-
add(
Duration duration) → XPathDateTime -
Adds a
durationto this date-time. -
atomize(
) → XPathAtomic -
Atomizes this item into an XPathAtomic value.
inherited
-
compareTo(
XPathAtomic other) → int -
Compares this object to another object.
override
-
difference(
XPathDateTime other) → Duration -
Calculates the difference between this and
otherdate-time. -
isAfter(
XPathDateTime other) → bool -
Checks if this instant is after
other. -
isAtSameMomentAs(
XPathDateTime other) → bool -
Checks if this instant is at the same moment as
other. -
isBefore(
XPathDateTime other) → bool -
Checks if this instant is before
other. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subtract(
Duration duration) → XPathDateTime -
Subtracts a
durationfrom this date-time. -
toDateTime(
) → DateTime - Converts this object to a standard Dart DateTime representation.
-
toLocal(
) → XPathDateTime - Converts this date-time representation to local time.
-
toString(
) → String -
A string representation of this object.
override
-
toUtc(
) → XPathDateTime - Converts this date-time representation to UTC.
-
toValue(
) → DateTime -
Converts this item to a native Dart value.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
tryParse(
String value, [XPathType type = xsDateTime]) → XPathDateTime? - Attempts to parse a string representation of a date/time.
-
tryParseDate(
String value) → XPathDateTime? - Attempts to parse a string representation of a date.
-
tryParseDateTimeStamp(
String value) → XPathDateTime? - Attempts to parse a string representation of an xs:dateTimeStamp.
-
tryParseDay(
String value) → XPathDateTime? - Attempts to parse a string representation of a gDay.
-
tryParseMonth(
String value) → XPathDateTime? - Attempts to parse a string representation of a gMonth.
-
tryParseMonthDay(
String value) → XPathDateTime? - Attempts to parse a string representation of a gMonthDay.
-
tryParseTime(
String value) → XPathDateTime? - Attempts to parse a string representation of a time.
-
tryParseYear(
String value) → XPathDateTime? - Attempts to parse a string representation of a gYear.
-
tryParseYearMonth(
String value) → XPathDateTime? - Attempts to parse a string representation of a gYearMonth.