21 use Wikimedia\Timestamp\TimestampException;
43 $this->rangeConds = [];
46 if ( $startStamp !==
'' ) {
48 $startOffset = $this->mDb->timestamp( $startTimestamp->getTimestamp() );
49 $this->rangeConds[] = $this->mIndexField .
'>=' . $this->mDb->addQuotes( $startOffset );
52 if ( $endStamp !==
'' ) {
54 $endOffset = $this->mDb->timestamp( $endTimestamp->getTimestamp() );
55 $this->rangeConds[] = $this->mIndexField .
'<=' . $this->mDb->addQuotes( $endOffset );
58 $this->mYear = (int)$endTimestamp->format(
'Y' );
59 $this->mMonth = (int)$endTimestamp->format(
'm' );
60 $this->mDay = (int)$endTimestamp->format(
'd' );
61 $this->mOffset = $endOffset;
63 }
catch ( TimestampException $ex ) {
86 $legacyTimestamp->timestamp = $legacyTimestamp->timestamp->modify(
'-1 second' );
106 if ( $this->rangeConds ) {
107 $conds = array_merge( $conds, $this->rangeConds );