44 $this->rangeConds = [];
47 if ( $startTime !==
'' ) {
48 $startTimestamp = MWTimestamp::getInstance( $startTime );
49 $this->startOffset = $this->mDb->timestamp( $startTimestamp->getTimestamp() );
50 $this->rangeConds[] = $this->mDb->buildComparison(
'>=',
54 if ( $endTime !==
'' ) {
55 $endTimestamp = MWTimestamp::getInstance( $endTime );
58 $endTimestamp->timestamp = $endTimestamp->timestamp->modify(
'+1 second' );
59 $this->endOffset = $this->mDb->timestamp( $endTimestamp->getTimestamp() );
60 $this->rangeConds[] = $this->mDb->buildComparison(
'<',
64 $this->mYear = (int)$endTimestamp->format(
'Y' );
65 $this->mMonth = (int)$endTimestamp->format(
'm' );
66 $this->mDay = (int)$endTimestamp->format(
'd' );
68 }
catch ( TimestampException ) {
90 [ $tables, $fields, $conds, $fname, $options, $join_conds ] = parent::buildQueryInfo(
96 if ( $this->startOffset ) {
97 $conds[] = $this->mDb->expr( $this->
getTimestampField(),
'>=', $this->startOffset );
98 } elseif ( $this->rangeConds ) {
100 $conds = array_merge( $conds, $this->rangeConds );
103 return [ $tables, $fields, $conds, $fname, $options, $join_conds ];