Noda Time
Offset Structure
NamespacesNodaTimeOffset

[This is preliminary documentation and is subject to change.]

An offset from UTC in milliseconds. A positive value means that the local time is ahead of UTC (e.g. for Europe); a negative value means that the local time is behind UTC (e.g. for America).
Declaration Syntax
C#Visual BasicVisual C++
public struct Offset : IEquatable<Offset>, 
	IComparable<Offset>, IFormattable, IComparable, IXmlSerializable
Public Structure Offset _
	Implements IEquatable(Of Offset), IComparable(Of Offset),  _
	IFormattable, IComparable, IXmlSerializable
public value class Offset : IEquatable<Offset>, 
	IComparable<Offset>, IFormattable, IComparable, IXmlSerializable
Members
All MembersMethodsPropertiesFields



IconMemberDescription
Add(Offset, Offset)
Adds one Offset to another. Friendly alternative to operator+().

Addition(Offset, Offset)
Implements the operator + (addition).

CompareTo(Offset)
Compares the current object with another object of the same type.

Equality(Offset, Offset)
Implements the operator == (equality).

Equals(Offset)
Indicates whether the current object is equal to another object of the same type.

Equals(Object)
Determines whether the specified Object is equal to this instance.
(Overrides ValueType.Equals(Object).)
FromHours(Int32)
Creates an offset with the specified number of hours, which may be negative.

FromHoursAndMinutes(Int32, Int32)
Creates an offset with the specified number of hours and minutes.

FromMilliseconds(Int32)
Returns the offset for the given milliseconds value, which may be negative.

FromTicks(Int64)
Creates a new offset from the given number of ticks, which may be negative.

GetHashCode()()()()
Returns a hash code for this instance.
(Overrides ValueType.GetHashCode()()()().)
GreaterThan(Offset, Offset)
Implements the operator > (greater than).

GreaterThanOrEqual(Offset, Offset)
Implements the operator >= (greater than or equal).

Inequality(Offset, Offset)
Implements the operator != (inequality).

LessThan(Offset, Offset)
Implements the operator < (less than).

LessThanOrEqual(Offset, Offset)
Implements the operator <= (less than or equal).

Max(Offset, Offset)
Returns the greater offset of the given two, i.e. the one which will give a later local time when added to an instant.

MaxValue
The maximum permitted offset; one millisecond less than a standard day after UTC.

Milliseconds
Gets the total number of milliseconds in the offset, which may be negative.

Min(Offset, Offset)
Returns the lower offset of the given two, i.e. the one which will give an earlier local time when added to an instant.

Minus(Offset)
Returns the result of subtracting another Offset from this one, for a fluent alternative to operator-().

MinValue
The minimum permitted offset; one millisecond less than a standard day before UTC.

Negate(Offset)
Returns the negation of the specified offset. This is the method form of the unary minus operator.

Plus(Offset)
Returns the result of adding another Offset to this one, for a fluent alternative to operator+().

Subtract(Offset, Offset)
Subtracts one Offset from another. Friendly alternative to operator-().

Subtraction(Offset, Offset)
Implements the operator - (subtraction).

Ticks
Returns the number of ticks represented by this offset, which may be negative.

ToString()()()()
Returns a String that represents this instance.
(Overrides ValueType.ToString()()()().)
ToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.

ToTimeSpan()()()()
Converts this offset to a .NET standard TimeSpan value.

UnaryNegation(Offset)
Implements the unary operator - (negation).

UnaryPlus(Offset)
Implements the unary operator + .

Zero
An offset of zero ticks - effectively the permanent offset for UTC.

Remarks
Offsets are always strictly less than 24 hours (as either a positive or negative offset).
Thread Safety
This type is an immutable value type. See the thread safety section of the user guide for more information.

Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)