Click or drag to resize

MediaWikiHelperParseDateTimeOffset Method

This is preliminary documentation and is subject to change.

Parses a DateTimeOffset from MediaWiki API timestamp from the API response.

Namespace: WikiClientLibrary.Infrastructures
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.3+0a73c45f0c78941900e328c6c6b819597b665e00
Syntax
public static DateTimeOffset ParseDateTimeOffset(
	string expression
)

Parameters

expression  String
The timestamp expression to be parsed.

Return Value

DateTimeOffset
Exceptions
ExceptionCondition
ArgumentNullExceptionexpression is null.
ArgumentExceptionexpression is empty.
FormatExceptionexpression is not a valid timestamp expression.
Remarks

This converter handles the following JSON string values as MaxValue or MaxValue:

  • infinity
  • infinite
  • indefinite
  • never

For now this method supports conversion of ISO 8601 format. If you are using this class and need more support within the API specification linked below, please open an issue in WCL repository.

See mw:API:Data formats#Timestamps for more information.

See Also