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.​Utility.​BclConversions

Assembly: NodaTime

Inheritance: object → BclConversions

Conversion methods which don't naturally fit into any other types - for example, for enums which can't specify any other code. In most cases, conversions to and from BCL types are provided within the type itself - such as <see cref="M:NodaTime.LocalDateTime.ToDateTimeUnspecified" /> and <see cref="M:NodaTime.LocalDateTime.FromDateTime(System.DateTime)" /> .

Remarks

These methods are also available in the form of extension methods in the <c>NodaTime.Extensions</c> namespace.

Methods

public static System.​DayOfWeek
ToDayOfWeek​(IsoDayOfWeek isoDayOfWeek)
Converts from the Noda Time <see cref="T:NodaTime.IsoDayOfWeek" /> enum to the equivalent BCL <see cref="T:System.DayOfWeek" /> value. Other than Sunday, the BCL and ISO values are the same - but ISO 8601 defines Sunday as day 7, and the BCL defines it as day 0.
Returns The ISO day of week value equivalent to the one passed in.
isoDayOfWeek ISO day of week value to convert.
public static IsoDayOfWeek
ToIsoDayOfWeek​(System.​DayOfWeek dayOfWeek)
Converts from the BCL <see cref="T:System.DayOfWeek" /> enum to the equivalent Noda Time <see cref="T:NodaTime.IsoDayOfWeek" /> value. Other than Sunday, the BCL and ISO values are the same - but ISO 8601 defines Sunday as day 7, and the BCL defines it as day 0.
Returns The BCL day of week value equivalent to the one passed in.
dayOfWeek ISO day of week value to convert.
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