Table of Contents

Class Duration

Namespace
Neo4j.Driver
Assembly
Neo4j.Driver.dll

Represents temporal amount containing months, days, seconds and nanoseconds. A duration can hold a negative value.

public sealed class Duration : TemporalValue, IConvertible, IEquatable<Duration>, IComparable, IComparable<Duration>
Inheritance
Duration
Implements
Inherited Members
Extension Methods

Constructors

Duration(long)

Initializes a new instance of Duration in terms of Seconds

Duration(long, int)

Initializes a new instance of Duration in terms of Seconds and Nanos

Duration(long, long, int)

Initializes a new instance of Duration in terms of Days, Seconds and Nanos

Duration(long, long, long, int)

Initializes a new instance of Duration with all supported temporal fields

Fields

Comparer

Default comparer for Duration values.

Properties

Days

The number of days in this duration.

Months

The number of months in this duration.

Nanos

The number of nanoseconds in this duration.

Seconds

The number of seconds in this duration.

Methods

CompareTo(Duration)

Compares the value of this instance to a specified Duration value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified DateTime value.

CompareTo(object)

Compares the value of this instance to a specified object which is expected to be a Duration value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified Duration value.

Equals(Duration)

Returns a value indicating whether the value of this instance is equal to the value of the specified Duration instance.

Equals(object)

Returns a value indicating whether this instance is equal to a specified object.

GetHashCode()

Returns the hash code for this instance.

ToString()

Converts the value of the current Duration object to its equivalent string representation.

Operators

operator >(Duration, Duration)

Determines whether one specified Duration is more than another specified Duration.

operator >=(Duration, Duration)

Determines whether one specified Duration represents a duration that is the same as or less than the other specified Duration

operator <(Duration, Duration)

Determines whether one specified Duration is less than another specified Duration.

operator <=(Duration, Duration)

Determines whether one specified Duration represents a duration that is the same as or more than the other specified Duration