 | MediaWikiHelperTryParseDateTime Method |
This is preliminary documentation and is subject to change.
Tries to parse a
DateTime from MediaWiki API timestamp from the API response.
Namespace: WikiClientLibrary.InfrastructuresAssembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.3+0a73c45f0c78941900e328c6c6b819597b665e00
Syntaxpublic static bool TryParseDateTime(
string expression,
out DateTime result
)
Public Shared Function TryParseDateTime (
expression As String,
<OutAttribute> ByRef result As DateTime
) As Boolean
Dim expression As String
Dim result As DateTime
Dim returnValue As Boolean
returnValue = MediaWikiHelper.TryParseDateTime(expression,
result)
public:
static bool TryParseDateTime(
String^ expression,
[OutAttribute] DateTime% result
)
static member TryParseDateTime :
expression : string *
result : DateTime byref -> bool
Parameters
- expression String
- The timestamp expression to be parsed.
- result DateTime
- The variable to receive the parsed result.
Return Value
BooleanA boolean indicates whether the parsing is successful.
Exceptions
RemarksThis 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