21 use Wikimedia\Timestamp\TimestampException;
39 if ( isset( $this->mNavigationBar ) ) {
44 'prev' => $this->
msg(
'pager-newer-n' )->numParams( $this->mLimit )->escaped(),
45 'next' => $this->
msg(
'pager-older-n' )->numParams( $this->mLimit )->escaped(),
46 'first' => $this->
msg(
'histlast' )->escaped(),
47 'last' => $this->
msg(
'histfirst' )->escaped()
52 $limits = $this->
getLanguage()->pipeList( $limitLinks );
53 $firstLastLinks = $this->
msg(
'parentheses' )->rawParams(
"{$pagingLinks['first']}" .
54 $this->
msg(
'pipe-separator' )->escaped() .
55 "{$pagingLinks['last']}" )->escaped();
57 $this->mNavigationBar = $firstLastLinks .
' ' .
58 $this->
msg(
'viewprevnext' )->rawParams(
59 $pagingLinks[
'prev'], $pagingLinks[
'next'], $limits )->escaped();
80 if ( $year <= 0 && ( $month <= 0 || $month >= 13 ) ) {
88 $selectedDate =
new DateTime( $timestamp->getTimestamp( TS_ISO_8601 ) );
89 $selectedDate = $selectedDate->modify(
'-1 day' );
91 $this->mYear = (int)$selectedDate->format(
'Y' );
92 $this->mMonth = (int)$selectedDate->format(
'm' );
93 $this->mDay = (int)$selectedDate->format(
'd' );
94 $this->mOffset = $this->mDb->timestamp( $timestamp->getTimestamp() );
95 }
catch ( TimestampException
$e ) {
128 $year = $timestamp->format(
'Y' );
130 if ( $month > $timestamp->format(
'n' ) ) {
135 if ( $month && $month > 0 && $month < 13 ) {
137 $day = checkdate( $month, $day, $year ) ? $day :
false;
139 if ( $day && $day > 0 ) {
144 if ( !checkdate( $month, $day, $year ) ) {
168 if ( $year > 2032 ) {
172 $ymd = (int)sprintf(
"%04d%02d%02d", $year, $month, $day );
174 if ( $ymd > 20320101 ) {