# Struct NpgsqlTimeSpan

Represents the PostgreSQL interval datatype.

##### Implements

**Namespace**: NpgsqlTypes

**Assembly**: Npgsql.dll

##### Syntax

`public struct NpgsqlTimeSpan : IComparable, IComparer, IEquatable<NpgsqlTimeSpan>, IComparable<NpgsqlTimeSpan>, IComparer<NpgsqlTimeSpan>`

**Remarks**

PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day
(to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept
of months that doesn't exist in .NET's

For most uses just casting to and from TimeSpan will work correctly — in particular,
the results of subtracting one

If you don't know whether these differences are important to your application, they
probably arent! Just use

To avoid forcing unnecessary provider-specific concerns on users who need not be concerned
with them a call to

### Constructors

| Improve this Doc View Source#### NpgsqlTimeSpan(Int32, Int32, Int32, Int32)

Initializes a new NpgsqlTimeSpan to the specified number of days, hours, minutes & seconds.

##### Declaration

`public NpgsqlTimeSpan(int days, int hours, int minutes, int seconds)`

##### Parameters

Type | Name | Description |
---|---|---|

Int32 | days | Number of days. |

Int32 | hours | Number of hours. |

Int32 | minutes | Number of minutes. |

Int32 | seconds | Number of seconds. |

#### NpgsqlTimeSpan(Int32, Int32, Int32, Int32, Int32)

Initializes a new NpgsqlTimeSpan to the specified number of days, hours, minutes, seconds & milliseconds.

##### Declaration

`public NpgsqlTimeSpan(int days, int hours, int minutes, int seconds, int milliseconds)`

##### Parameters

Type | Name | Description |
---|---|---|

Int32 | days | Number of days. |

Int32 | hours | Number of hours. |

Int32 | minutes | Number of minutes. |

Int32 | seconds | Number of seconds. |

Int32 | milliseconds | Number of milliseconds. |

#### NpgsqlTimeSpan(Int32, Int32, Int32, Int32, Int32, Int32)

Initializes a new NpgsqlTimeSpan to the specified number of months, days, hours, minutes, seconds & milliseconds.

##### Declaration

`public NpgsqlTimeSpan(int months, int days, int hours, int minutes, int seconds, int milliseconds)`

##### Parameters

Type | Name | Description |
---|---|---|

Int32 | months | Number of months. |

Int32 | days | Number of days. |

Int32 | hours | Number of hours. |

Int32 | minutes | Number of minutes. |

Int32 | seconds | Number of seconds. |

Int32 | milliseconds | Number of milliseconds. |

#### NpgsqlTimeSpan(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

Initializes a new NpgsqlTimeSpan to the specified number of years, months, days, hours, minutes, seconds & milliseconds.

Years are calculated exactly equivalent to 12 months.

##### Declaration

`public NpgsqlTimeSpan(int years, int months, int days, int hours, int minutes, int seconds, int milliseconds)`

##### Parameters

Type | Name | Description |
---|---|---|

Int32 | years | Number of years. |

Int32 | months | Number of months. |

Int32 | days | Number of days. |

Int32 | hours | Number of hours. |

Int32 | minutes | Number of minutes. |

Int32 | seconds | Number of seconds. |

Int32 | milliseconds | Number of milliseconds. |

#### NpgsqlTimeSpan(Int32, Int32, Int64)

Initializes a new NpgsqlTimeSpan to the specified number of months, days & ticks.

##### Declaration

`public NpgsqlTimeSpan(int months, int days, long ticks)`

##### Parameters

Type | Name | Description |
---|---|---|

Int32 | months | Number of months. |

Int32 | days | Number of days. |

Int64 | ticks | Number of 100ns units. |

#### NpgsqlTimeSpan(Int64)

Initializes a new NpgsqlTimeSpan to the specified number of ticks.

##### Declaration

`public NpgsqlTimeSpan(long ticks)`

##### Parameters

Type | Name | Description |
---|---|---|

Int64 | ticks | A time period expressed in 100ns units. |

#### NpgsqlTimeSpan(TimeSpan)

Initializes a new NpgsqlTimeSpan to hold the same time as a

##### Declaration

`public NpgsqlTimeSpan(TimeSpan timespan)`

##### Parameters

Type | Name | Description |
---|---|---|

TimeSpan | timespan | A time period expressed in a |

### Fields

| Improve this Doc View Source#### DaysPerMonth

Represents the number of days assumed in one month if month justification or unjustifcation is performed. This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause a year to be taken as 30 × 12 = 360 rather than 356/366 days.

##### Declaration

`public const int DaysPerMonth = null`

##### Field Value

Type | Description |
---|---|

Int32 |

#### HoursPerDay

Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant.

##### Declaration

`public const int HoursPerDay = null`

##### Field Value

Type | Description |
---|---|

Int32 |

#### MaxValue

Represents the maximum NpgsqlTimeSpan. This field is read-only.

##### Declaration

`public static readonly NpgsqlTimeSpan MaxValue`

##### Field Value

Type | Description |
---|---|

NpgsqlTimeSpan |

#### MinValue

Represents the minimum NpgsqlTimeSpan. This field is read-only.

##### Declaration

`public static readonly NpgsqlTimeSpan MinValue`

##### Field Value

Type | Description |
---|---|

NpgsqlTimeSpan |

#### MonthsPerYear

Represents the number of months in a year. This field is constant.

##### Declaration

`public const int MonthsPerYear = null`

##### Field Value

Type | Description |
---|---|

Int32 |

#### TicksPerDay

Represents the number of ticks (100ns periods) in one day. This field is constant.

##### Declaration

`public const long TicksPerDay = null`

##### Field Value

Type | Description |
---|---|

Int64 |

#### TicksPerHour

Represents the number of ticks (100ns periods) in one hour. This field is constant.

##### Declaration

`public const long TicksPerHour = null`

##### Field Value

Type | Description |
---|---|

Int64 |

#### TicksPerMicrosecond

Represents the number of ticks (100ns periods) in one microsecond. This field is constant.

##### Declaration

`public const long TicksPerMicrosecond = null`

##### Field Value

Type | Description |
---|---|

Int64 |

#### TicksPerMillsecond

Represents the number of ticks (100ns periods) in one millisecond. This field is constant.

##### Declaration

`public const long TicksPerMillsecond = null`

##### Field Value

Type | Description |
---|---|

Int64 |

#### TicksPerMinute

Represents the number of ticks (100ns periods) in one minute. This field is constant.

##### Declaration

`public const long TicksPerMinute = null`

##### Field Value

Type | Description |
---|---|

Int64 |

#### TicksPerMonth

Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. DaysPerMonth

##### Declaration

`public const long TicksPerMonth = null`

##### Field Value

Type | Description |
---|---|

Int64 |

#### TicksPerSecond

Represents the number of ticks (100ns periods) in one second. This field is constant.

##### Declaration

`public const long TicksPerSecond = null`

##### Field Value

Type | Description |
---|---|

Int64 |

#### Zero

Represents the zero NpgsqlTimeSpan. This field is read-only.

##### Declaration

`public static readonly NpgsqlTimeSpan Zero`

##### Field Value

Type | Description |
---|---|

NpgsqlTimeSpan |

### Properties

| Improve this Doc View Source#### Days

Gets the number of days held in the instance.

##### Declaration

`public int Days { get; }`

##### Property Value

Type | Description |
---|---|

Int32 |

#### Hours

Gets the number of whole hours held in the instance.

##### Declaration

`public int Hours { get; }`

##### Property Value

Type | Description |
---|---|

Int32 |

#### Microseconds

Gets the number of whole microseconds held in the instance.

##### Declaration

`public int Microseconds { get; }`

##### Property Value

Type | Description |
---|---|

Int32 |

#### Milliseconds

Gets the number of whole milliseconds held in the instance.

##### Declaration

`public int Milliseconds { get; }`

##### Property Value

Type | Description |
---|---|

Int32 |

#### Minutes

Gets the number of whole minutes held in the instance.

##### Declaration

`public int Minutes { get; }`

##### Property Value

Type | Description |
---|---|

Int32 |

#### Months

Gets the number of months held in the instance.

##### Declaration

`public int Months { get; }`

##### Property Value

Type | Description |
---|---|

Int32 |

#### Seconds

Gets the number of whole seconds held in the instance.

##### Declaration

`public int Seconds { get; }`

##### Property Value

Type | Description |
---|---|

Int32 |

#### Ticks

The total number of ticks(100ns units) contained. This is the resolution of the
NpgsqlTimeSpan type. This ignores the number of days and
months held. If you want them included use UnjustifyInterval() first.

- interval(0)resolution of 1s (1 second)
- interval(1)resolution of 100ms = 0.1s (100 milliseconds)
- interval(2)resolution of 10ms = 0.01s (10 milliseconds)
- interval(3)resolution of 1ms = 0.001s (1 millisecond)
- interval(4)resolution of 100µs = 0.0001s (100 microseconds)
- interval(5)resolution of 10µs = 0.00001s (10 microseconds)
- interval(6) or intervalresolution of 1µs = 0.000001s (1 microsecond)

As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will not suffice for those purposes.

In more frequent cases though, the resolution of the interval suffices. NpgsqlTimeSpan will always suffice to handle the resolution of any interval value, and upon writing to the database, will be rounded to the resolution used.

##### Declaration

`public long Ticks { get; }`

##### Property Value

Type | Description |
---|---|

Int64 |

#### Time

Returns a

##### Declaration

`public TimeSpan Time { get; }`

##### Property Value

Type | Description |
---|---|

TimeSpan |

#### TotalDays

The total number of days in the instance, assuming 24 hours in each day and 30 days in a month.

##### Declaration

`public double TotalDays { get; }`

##### Property Value

Type | Description |
---|---|

Double |

#### TotalHours

The total number of hours in the instance, assuming 24 hours in each day and 30 days in a month.

##### Declaration

`public double TotalHours { get; }`

##### Property Value

Type | Description |
---|---|

Double |

#### TotalMicroseconds

The total number of microseconds in the instance, assuming 24 hours in each day and 30 days in a month.

##### Declaration

`public double TotalMicroseconds { get; }`

##### Property Value

Type | Description |
---|---|

Double |

#### TotalMilliseconds

The total number of milliseconds in the instance, assuming 24 hours in each day and 30 days in a month.

##### Declaration

`public double TotalMilliseconds { get; }`

##### Property Value

Type | Description |
---|---|

Double |

#### TotalMinutes

The total number of minutes in the instance, assuming 24 hours in each day and 30 days in a month.

##### Declaration

`public double TotalMinutes { get; }`

##### Property Value

Type | Description |
---|---|

Double |

#### TotalMonths

The total number of months in the instance, assuming 24 hours in each day and 30 days in a month.

##### Declaration

`public double TotalMonths { get; }`

##### Property Value

Type | Description |
---|---|

Double |

#### TotalSeconds

The total number of seconds in the instance, assuming 24 hours in each day and 30 days in a month.

##### Declaration

`public double TotalSeconds { get; }`

##### Property Value

Type | Description |
---|---|

Double |

#### TotalTicks

The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and 30 days in a month.

##### Declaration

`public long TotalTicks { get; }`

##### Property Value

Type | Description |
---|---|

Int64 |

### Methods

| Improve this Doc View Source#### Add(NpgsqlTimeSpan)

Adds another interval to this instance and returns the result.

##### Declaration

`public NpgsqlTimeSpan Add(in NpgsqlTimeSpan interval)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | interval | An NpgsqlTimeSpan to add to this instance. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan whose values are the sums of the two instances. |

#### Canonicalize()

Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23].

While the fact that for many purposes, two different NpgsqlTimeSpan instances could be considered equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms.

E.g. we could move all excess hours into days and all excess days into months and have the most readable form, or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form chosen has two important properties that make it the best choice.

First, it is closest two how

Note that the results of casting a

##### Declaration

`public NpgsqlTimeSpan Canonicalize()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] converted into days. |

#### Compare(NpgsqlTimeSpan, NpgsqlTimeSpan)

Compares two NpgsqlTimeSpan instances.

##### Declaration

`public static int Compare(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The first NpgsqlTimeSpan. |

NpgsqlTimeSpan | y | The second NpgsqlTimeSpan. |

##### Returns

Type | Description |
---|---|

Int32 | 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, a value less than zero if x is less than y. |

#### CompareTo(NpgsqlTimeSpan)

Compares this instance with another/

##### Declaration

`public int CompareTo(NpgsqlTimeSpan other)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | other | An NpgsqlTimeSpan to compare this with. |

##### Returns

Type | Description |
---|---|

Int32 | 0 if the instances are equal or equivalent. A value less than zero if this instance is less than the argument. A value greater than zero if this instance is greater than the instance. |

#### CompareTo(Nullable<Object>)

Compares this instance with another/

##### Declaration

`public int CompareTo(object? other)`

##### Parameters

Type | Name | Description |
---|---|---|

Nullable<Object> | other | An object to compare this with. |

##### Returns

Type | Description |
---|---|

Int32 | 0 if the argument is an NpgsqlTimeSpan and the instances are equal or equivalent. A value less than zero if the argument is an NpgsqlTimeSpan and this instance is less than the argument. A value greater than zero if the argument is an NpgsqlTimeSpan and this instance is greater than the instance. |

#### Duration()

This absolute value of this instance. In the case of some, but not all, components being negative, the rules used for justification are used to determine if the instance is positive or negative.

##### Declaration

`public NpgsqlTimeSpan Duration()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan whose value is the absolute value of this instance. |

#### Equals(NpgsqlTimeSpan)

Returns true if another NpgsqlTimeSpan is exactly the same as this instance.

##### Declaration

`public bool Equals(NpgsqlTimeSpan other)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | other | An NpgsqlTimeSpan for comparison. |

##### Returns

Type | Description |
---|---|

Boolean | true if the two NpgsqlTimeSpan instances are exactly the same, false otherwise. |

#### Equals(Nullable<Object>)

Returns true if another object is an NpgsqlTimeSpan, that is exactly the same as this instance

##### Declaration

`public override bool Equals(object? obj)`

##### Parameters

Type | Name | Description |
---|---|---|

Nullable<Object> | obj | An |

##### Returns

Type | Description |
---|---|

Boolean | true if the argument is an NpgsqlTimeSpan and is exactly the same as this one, false otherwise. |

#### FromDays(Double)

Creates an NpgsqlTimeSpan from a number of days.

##### Declaration

`public static NpgsqlTimeSpan FromDays(double days)`

##### Parameters

Type | Name | Description |
---|---|---|

Double | days | The number of days in the interval. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | A Canonicalize()d NpgsqlTimeSpan with the given number of days. |

#### FromHours(Double)

Creates an NpgsqlTimeSpan from a number of hours.

##### Declaration

`public static NpgsqlTimeSpan FromHours(double hours)`

##### Parameters

Type | Name | Description |
---|---|---|

Double | hours | The number of hours in the interval. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | A Canonicalize()d NpgsqlTimeSpan with the given number of hours. |

#### FromMicroseconds(Double)

Creates an NpgsqlTimeSpan from a number of microseconds.

##### Declaration

`public static NpgsqlTimeSpan FromMicroseconds(double micro)`

##### Parameters

Type | Name | Description |
---|---|---|

Double | micro | The number of microseconds in the interval. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | A Canonicalize()d NpgsqlTimeSpan with the given number of microseconds. |

#### FromMilliseconds(Double)

Creates an NpgsqlTimeSpan from a number of milliseconds.

##### Declaration

`public static NpgsqlTimeSpan FromMilliseconds(double milli)`

##### Parameters

Type | Name | Description |
---|---|---|

Double | milli | The number of milliseconds in the interval. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | A Canonicalize()d NpgsqlTimeSpan with the given number of milliseconds. |

#### FromMinutes(Double)

Creates an NpgsqlTimeSpan from a number of minutes.

##### Declaration

`public static NpgsqlTimeSpan FromMinutes(double minutes)`

##### Parameters

Type | Name | Description |
---|---|---|

Double | minutes | The number of minutes in the interval. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | A Canonicalize()d NpgsqlTimeSpan with the given number of minutes. |

#### FromMonths(Double)

Creates an NpgsqlTimeSpan from a number of months.

##### Declaration

`public static NpgsqlTimeSpan FromMonths(double months)`

##### Parameters

Type | Name | Description |
---|---|---|

Double | months | The number of months in the interval. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | A Canonicalize()d NpgsqlTimeSpan with the given number of months. |

#### FromSeconds(Double)

Creates an NpgsqlTimeSpan from a number of seconds.

##### Declaration

`public static NpgsqlTimeSpan FromSeconds(double seconds)`

##### Parameters

Type | Name | Description |
---|---|---|

Double | seconds | The number of seconds in the interval. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | A Canonicalize()d NpgsqlTimeSpan with the given number of seconds. |

#### FromTicks(Int64)

Creates an NpgsqlTimeSpan from a number of ticks.

##### Declaration

`public static NpgsqlTimeSpan FromTicks(long ticks)`

##### Parameters

Type | Name | Description |
---|---|---|

Int64 | ticks | The number of ticks (100ns units) in the interval. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | A Canonicalize()d NpgsqlTimeSpan with the given number of ticks. |

#### GetHashCode()

A hash code suitable for uses with hashing algorithms.

##### Declaration

`public override int GetHashCode()`

##### Returns

Type | Description |
---|---|

Int32 | An signed integer. |

#### JustifyDays()

Equivalent to PostgreSQL's justify_days function.

##### Declaration

`public NpgsqlTimeSpan JustifyDays()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan based on this one, but with any hours outside of the range [-23, 23] converted into days. |

#### JustifyInterval()

Equivalent to PostgreSQL's justify_interval function.

##### Declaration

`public NpgsqlTimeSpan JustifyInterval()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan based on this one, but with any months converted to multiples of ±30days and then with any days converted to multiples of ±24hours |

#### JustifyMonths()

Equivalent to PostgreSQL's justify_months function.

##### Declaration

`public NpgsqlTimeSpan JustifyMonths()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan based on this one, but with any days outside of the range [-30, 30] converted into months. |

#### Negate()

Returns an NpgsqlTimeSpan whose value is the negated value of this instance.

##### Declaration

`public NpgsqlTimeSpan Negate()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan whose value is the negated value of this instance. |

#### Parse(String)

Parses a

##### Declaration

`public static NpgsqlTimeSpan Parse(string str)`

##### Parameters

Type | Name | Description |
---|---|---|

String | str | The |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan represented by the argument. |

#### Plus(NpgsqlTimeSpan)

Returns the instance.

##### Declaration

`public static NpgsqlTimeSpan Plus(in NpgsqlTimeSpan x)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan |

#### Subtract(NpgsqlTimeSpan)

Subtracts another interval from this instance and returns the result.

##### Declaration

`public NpgsqlTimeSpan Subtract(in NpgsqlTimeSpan interval)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | interval | An NpgsqlTimeSpan to subtract from this instance. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan whose values are the differences of the two instances. |

#### ToNpgsqlTimeSpan(TimeSpan)

Casts a

##### Declaration

`public static NpgsqlTimeSpan ToNpgsqlTimeSpan(TimeSpan timespan)`

##### Parameters

Type | Name | Description |
---|---|---|

TimeSpan | timespan |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan |

#### ToString()

Create a

##### Declaration

`public override string ToString()`

##### Returns

Type | Description |
---|---|

String | The |

#### ToTimeSpan(NpgsqlTimeSpan)

Casts an NpgsqlTimeSpan to a

##### Declaration

`public static TimeSpan ToTimeSpan(in NpgsqlTimeSpan interval)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | interval |

##### Returns

Type | Description |
---|---|

TimeSpan |

#### TryParse(String, out NpgsqlTimeSpan)

Attempt to parse a

##### Declaration

`public static bool TryParse(string str, out NpgsqlTimeSpan result)`

##### Parameters

Type | Name | Description |
---|---|---|

String | str | The |

NpgsqlTimeSpan | result | (out) The NpgsqlTimeSpan produced, or Zero if the parsing failed. |

##### Returns

Type | Description |
---|---|

Boolean | true if the parsing succeeded, false otherwise. |

#### UnjustifyDays()

Opposite to PostgreSQL's justify_days function.

##### Declaration

`public NpgsqlTimeSpan UnjustifyDays()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan based on this one, but with any days converted to multiples of ±24hours. |

#### UnjustifyInterval()

Opposite to PostgreSQL's justify_interval function.

##### Declaration

`public NpgsqlTimeSpan UnjustifyInterval()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; |

#### UnjustifyMonths()

Opposite to PostgreSQL's justify_months function.

##### Declaration

`public NpgsqlTimeSpan UnjustifyMonths()`

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan based on this one, but with any months converted to multiples of ±30days. |

### Operators

| Improve this Doc View Source#### Addition(NpgsqlTimeSpan, NpgsqlTimeSpan)

Adds two NpgsqlTimeSpan together.

##### Declaration

`public static NpgsqlTimeSpan operator +(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The first NpgsqlTimeSpan to add. |

NpgsqlTimeSpan | y | The second NpgsqlTimeSpan to add. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan whose values are the sum of the arguments. |

#### Equality(NpgsqlTimeSpan, NpgsqlTimeSpan)

Returns true if two NpgsqlTimeSpan are exactly the same.

##### Declaration

`public static bool operator ==(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The first NpgsqlTimeSpan to compare. |

NpgsqlTimeSpan | y | The second NpgsqlTimeSpan to compare. |

##### Returns

Type | Description |
---|---|

Boolean | true if the two arguments are exactly the same, false otherwise. |

#### Explicit(NpgsqlTimeSpan to TimeSpan)

Explicit cast of an NpgsqlTimeSpan to a

##### Declaration

`public static explicit operator TimeSpan(NpgsqlTimeSpan interval)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | interval |

##### Returns

Type | Description |
---|---|

TimeSpan | An equivalent |

#### GreaterThan(NpgsqlTimeSpan, NpgsqlTimeSpan)

Compares two NpgsqlTimeSpan instances to see if the first is greater than the second

##### Declaration

`public static bool operator>(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The first NpgsqlTimeSpan to compare. |

NpgsqlTimeSpan | y | The second NpgsqlTimeSpan to compare. |

##### Returns

Type | Description |
---|---|

Boolean | true if the first NpgsqlTimeSpan is greater than second, false otherwise. |

#### GreaterThanOrEqual(NpgsqlTimeSpan, NpgsqlTimeSpan)

Compares two NpgsqlTimeSpan instances to see if the first is greater than or equivalent the second

##### Declaration

`public static bool operator >=(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The first NpgsqlTimeSpan to compare. |

NpgsqlTimeSpan | y | The second NpgsqlTimeSpan to compare. |

##### Returns

Type | Description |
---|---|

Boolean | true if the first NpgsqlTimeSpan is greater than or equivalent to the second, false otherwise. |

#### Implicit(TimeSpan to NpgsqlTimeSpan)

Implicit cast of a

##### Declaration

`public static implicit operator NpgsqlTimeSpan(TimeSpan timespan)`

##### Parameters

Type | Name | Description |
---|---|---|

TimeSpan | timespan | A |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An eqivalent, canonical, NpgsqlTimeSpan. |

#### Inequality(NpgsqlTimeSpan, NpgsqlTimeSpan)

Returns false if two NpgsqlTimeSpan are exactly the same.

##### Declaration

`public static bool operator !=(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The first NpgsqlTimeSpan to compare. |

NpgsqlTimeSpan | y | The second NpgsqlTimeSpan to compare. |

##### Returns

Type | Description |
---|---|

Boolean | false if the two arguments are exactly the same, true otherwise. |

#### LessThan(NpgsqlTimeSpan, NpgsqlTimeSpan)

Compares two NpgsqlTimeSpan instances to see if the first is less than the second

##### Declaration

`public static bool operator <(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The first NpgsqlTimeSpan to compare. |

NpgsqlTimeSpan | y | The second NpgsqlTimeSpan to compare. |

##### Returns

Type | Description |
---|---|

Boolean | true if the first NpgsqlTimeSpan is less than second, false otherwise. |

#### LessThanOrEqual(NpgsqlTimeSpan, NpgsqlTimeSpan)

Compares two NpgsqlTimeSpan instances to see if the first is less than or equivalent to the second

##### Declaration

`public static bool operator <=(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The first NpgsqlTimeSpan to compare. |

NpgsqlTimeSpan | y | The second NpgsqlTimeSpan to compare. |

##### Returns

Type | Description |
---|---|

Boolean | true if the first NpgsqlTimeSpan is less than or equivalent to second, false otherwise. |

#### Subtraction(NpgsqlTimeSpan, NpgsqlTimeSpan)

Subtracts one NpgsqlTimeSpan from another.

##### Declaration

`public static NpgsqlTimeSpan operator -(NpgsqlTimeSpan x, NpgsqlTimeSpan y)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | The NpgsqlTimeSpan to subtract the other from. |

NpgsqlTimeSpan | y | The NpgsqlTimeSpan to subtract from the other. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | An NpgsqlTimeSpan whose values are the difference of the arguments |

#### UnaryNegation(NpgsqlTimeSpan)

Negates an NpgsqlTimeSpan instance.

##### Declaration

`public static NpgsqlTimeSpan operator -(NpgsqlTimeSpan x)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x | An NpgsqlTimeSpan. |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan | The negation of the argument. |

#### UnaryPlus(NpgsqlTimeSpan)

Returns the instance.

##### Declaration

`public static NpgsqlTimeSpan operator +(NpgsqlTimeSpan x)`

##### Parameters

Type | Name | Description |
---|---|---|

NpgsqlTimeSpan | x |

##### Returns

Type | Description |
---|---|

NpgsqlTimeSpan |