16 public function testGetDateCond( $inputYear, $inputMonth, $inputDay, $expected ) {
17 $pager = $this->getMockForAbstractClass( RangeChronologicalPager::class );
20 wfTimestamp( TS_MW, $pager->getDateCond( $inputYear, $inputMonth, $inputDay ) )
29 [ 2016, 12, 5,
'20161205235959' ],
30 [ 2016, 12, 31,
'20161231235959' ],
31 [ 2016, 12, 1337,
'20161231235959' ],
32 [ 2016, 1337, 1337,
'20161231235959' ],
33 [ 2016, 1337, -1,
'20161231235959' ],
34 [ 2016, 12, 32,
'20161231235959' ],
35 [ 2016, 12, -1,
'20161231235959' ],
36 [ 2016, -1, -1,
'20161231235959' ],
45 $pager = $this->getMockForAbstractClass( RangeChronologicalPager::class );
87 $pager = $this->getMockForAbstractClass( RangeChronologicalPager::class );
88 $this->assertEquals(
null, $pager->getDateRangeCond( $start, $end ) );
93 [
'-2016-12-01',
'2017-12-01', ],
94 [
'2016-12-01',
'-2017-12-01', ],
95 [
'abcdefghij',
'klmnopqrstu', ],
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.