Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Validators\TimestampPrecisionValidator Class Reference

Validate a date value, making sure that the day component is not 00 for day-precision values, and that the month component is not 00 for values with precision day or month. More...

+ Inheritance diagram for Wikibase\Repo\Validators\TimestampPrecisionValidator:
+ Collaboration diagram for Wikibase\Repo\Validators\TimestampPrecisionValidator:

Public Member Functions

 __construct ()
 
 validate ( $value)
 
 setOptions (array $options)
 

Private Attributes

 $precisionMonthValidator
 
 $precisionDayValidator
 

Detailed Description

Validate a date value, making sure that the day component is not 00 for day-precision values, and that the month component is not 00 for values with precision day or month.

It assumes that the input value is the array value of a TimeValue, i.e. it has precision and time fields, with the time in proper timestamp format.

Author
Noa Rave

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Validators\TimestampPrecisionValidator::__construct ( )

Member Function Documentation

◆ setOptions()

Wikibase\Repo\Validators\TimestampPrecisionValidator::setOptions ( array $options)
See also
ValueValidator::setOptions()
Parameters
array$options

◆ validate()

Wikibase\Repo\Validators\TimestampPrecisionValidator::validate ( $value)

Member Data Documentation

◆ $precisionDayValidator

Wikibase\Repo\Validators\TimestampPrecisionValidator::$precisionDayValidator
private

◆ $precisionMonthValidator

Wikibase\Repo\Validators\TimestampPrecisionValidator::$precisionMonthValidator
private

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