WikidataPain.DataValue

Members

type :string

value :Object

Methods

static fromEntity(entityId) → {WikidataPain.DataValue}

Parameters:
Name Type Description
entityId string

static fromRaw(raw) → {WikidataPain.DataValue}

Parameters:
Name Type Description
raw Object

static fromString(string) → {WikidataPain.DataValue}

Parameters:
Name Type Description
string string

static fromTime(year, monthopt, dayopt) → {WikidataPain.DataValue}

Parameters:
Name Type Attributes Default Description
year number
month number <optional>
null
day number <optional>
null

static fromTimestamp(date) → {WikidataPain.DataValue}

Convert a QuickStatement-date-string to a time-object.
Parameters:
Name Type Description
date string Timestamp in QuickStatement-format.

comparePrecision(other) → {WikidataPain.PrecisionComparison}

Compares the precision of this DataValue with another DataValue's precision.
Parameters:
Name Type Description
other WikidataPain.DataValue DataValue to compare to.

equals(other) → {boolean}

Compares this DataValue with another DataValue.
Parameters:
Name Type Description
other WikidataPain.DataValue DataValue to compare to.
Returns:
boolean - `true` if equal, otherwise `false`.

toJSON() → {Object}

Returns:
Object

toString() → {string}

Returns:
string