Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Rdf\JulianDateTimeValueCleaner Class Reference

Clean datetime value to conform to RDF/XML standards This class supports Julian->Gregorian conversion. More...

+ Inheritance diagram for Wikibase\Repo\Rdf\JulianDateTimeValueCleaner:
+ Collaboration diagram for Wikibase\Repo\Rdf\JulianDateTimeValueCleaner:

Public Member Functions

 getStandardValue (TimeValue $value)
 Get standardized dateTime value, compatible with xsd:dateTime If the value cannot be converted to it, returns null.
 
- Public Member Functions inherited from Wikibase\Repo\Rdf\DateTimeValueCleaner
 __construct ( $xsd11=true)
 

Private Member Functions

 julianDateValue ( $dateValue)
 Get Julian date value and return it as Gregorian date.
 

Additional Inherited Members

- Protected Member Functions inherited from Wikibase\Repo\Rdf\DateTimeValueCleaner
 cleanupGregorianValue ( $dateValue, $precision)
 Clean up Wikidata date value in Gregorian calendar.
 
 parseDateValue ( $dateValue)
 Parse date value and fix weird numbers there.
 
- Protected Attributes inherited from Wikibase\Repo\Rdf\DateTimeValueCleaner
 $xsd11 = true
 

Detailed Description

Clean datetime value to conform to RDF/XML standards This class supports Julian->Gregorian conversion.

Author
Stas Malyshev
Thiemo Kreuz

Member Function Documentation

◆ getStandardValue()

Wikibase\Repo\Rdf\JulianDateTimeValueCleaner::getStandardValue ( TimeValue  $value)

Get standardized dateTime value, compatible with xsd:dateTime If the value cannot be converted to it, returns null.

Parameters
TimeValue$value
Returns
string|null Value compatible with xsd:dateTime type, null if the input is an illegal XSD 1.0 timestamp

Reimplemented from Wikibase\Repo\Rdf\DateTimeValueCleaner.

◆ julianDateValue()

Wikibase\Repo\Rdf\JulianDateTimeValueCleaner::julianDateValue (   $dateValue)
private

Get Julian date value and return it as Gregorian date.

Parameters
string$dateValue
Exceptions
IllegalValueExceptionif the input is an illegal XSD 1.0 timestamp
Returns
string|null Value compatible with xsd:dateTime type, null if conversion is not possible

The documentation for this class was generated from the following file: