Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class NodaTime.​Extensions.​DateTimeOffsetExtensions

Assembly: NodaTime

Inheritance: object → DateTimeOffsetExtensions

Extension methods for <see cref="T:System.DateTimeOffset" /> .

Methods

public static OffsetDateTime
ToOffsetDateTime​(System.​DateTimeOffset dateTimeOffset)
Converts a <see cref="T:System.DateTimeOffset" /> to <see cref="T:NodaTime.OffsetDateTime" /> .
Returns A new <see cref="T:NodaTime.OffsetDateTime" /> with the same values as <paramref name="dateTimeOffset" /> .
dateTimeOffset The <c>DateTimeOffset</c> to convert.
Remarks This is a convenience method which calls <see cref="M:NodaTime.OffsetDateTime.FromDateTimeOffset(System.DateTimeOffset)" /> .
public static ZonedDateTime
ToZonedDateTime​(System.​DateTimeOffset dateTimeOffset)
Converts a <see cref="T:System.DateTimeOffset" /> to <see cref="T:NodaTime.ZonedDateTime" /> .
Returns A new <see cref="T:NodaTime.ZonedDateTime" /> with the same values as <paramref name="dateTimeOffset" /> , using a fixed-offset time zone.
dateTimeOffset The <c>DateTimeOffset</c> to convert.
Remarks This is a convenience method which calls <see cref="M:NodaTime.ZonedDateTime.FromDateTimeOffset(System.DateTimeOffset)" /> .
public static Instant
ToInstant​(System.​DateTimeOffset dateTimeOffset)
Converts a <see cref="T:System.DateTimeOffset" /> into an <see cref="T:NodaTime.Instant" /> .
Returns An <see cref="T:NodaTime.Instant" /> value representing the same instant in time as <paramref name="dateTimeOffset" /> .
dateTimeOffset The <c>DateTimeOffset</c> to convert.
Remarks This is a convenience method which calls <see cref="M:NodaTime.Instant.FromDateTimeOffset(System.DateTimeOffset)" /> .
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object