SemWeb : SemWeb Namespace
XsdDateTime Class

Represents an XSD dateTime, date, or time.

public class XsdDateTime

Remarks

This class is returned by for xsd:dateTime, xsd:date, and xsd:time values. Use the HasDate and HasTime fields to determine which data type the value came from.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.1, 1.0.6.2

Members

See Also: Inherited members from object.

Public Constructors

Creates a new instance of XsdDateTime.

Public Fields

readonly
Date DateTime . A date, if present in the value.
readonly
HasDate bool . Indicates whether a date is present in the value.
readonly
HasTime bool . Indicates whether a time is present in the value.
readonly
HasTimeZoneOffset bool . Indicates whether a time zone offset is present in the value. If not, the time is a local time. If so, the TimeZoneOffset gives the offset of the time from UTC.
readonly
Time TimeSpan . A time, if present in the value.
readonly
TimeZoneOffset TimeSpan . An offset from UTC, if time zone information is present in the value.

Member Details

XsdDateTime Constructor

Creates a new instance of XsdDateTime.

public XsdDateTime (DateTime date, TimeSpan time, TimeSpan offset, bool hasDate, bool hasTime, bool hasTimeZoneOffset)

Parameters

date
The date, if present in the value.
time
The time, if present in the value.
offset
The time's offset from UTC, if present in the value.
hasDate
Whether the value includes a date.
hasTime
Whether the value includes a time.
hasTimeZoneOffset
Whether the value includes a time zone offset.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Date Field

A date, if present in the value.

public readonly DateTime Date

Remarks

This field is only applicable if HasDate is true. Only the date portion of the DateTime value is used.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

HasDate Field

Indicates whether a date is present in the value.

public readonly bool HasDate

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

HasTime Field

Indicates whether a time is present in the value.

public readonly bool HasTime

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

HasTimeZoneOffset Field

Indicates whether a time zone offset is present in the value. If not, the time is a local time. If so, the TimeZoneOffset gives the offset of the time from UTC.

public readonly bool HasTimeZoneOffset

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

Time Field

A time, if present in the value.

public readonly TimeSpan Time

Remarks

This field is only applicable if HasTime is true.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2

TimeZoneOffset Field

An offset from UTC, if time zone information is present in the value.

public readonly TimeSpan TimeZoneOffset

Remarks

This field is only applicable if HasTimeZoneOffset is true.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.6.2