Skip to content

Commit edb98e4

Browse files
thomas-topway-itJeroenDeDauw
authored andcommitted
fix static
1 parent 0d6a4e6 commit edb98e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PackagePrivate/Humanizer/InternationalizedHumanizer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ private function humanizeDateWithoutUncertainty( ExtDate $date ): string {
215215
$day = $date->getDay();
216216

217217
if ( $year !== null ) {
218-
$year = $this->humanizeYear( $date );
218+
$year = $this->humanizeYear( $year, $date );
219219
}
220220

221221
if ( $month !== null ) {
@@ -266,14 +266,14 @@ private function scaleToMessageKey( int $scale ): string {
266266
return 'edtf-tens-of-trillions';
267267
}
268268

269-
private function humanizeYear( ExtDate $date ): string {
269+
private function humanizeYear( int $year, ExtDate $date ): string {
270270
$unspecifiedYearScale = $date->getUnspecifiedYearScale();
271271
$unspecifiedDigit = $date->getUnspecifiedDigit();
272272
$specifiedYears = $date->getSpecifiedYears();
273273

274274
if ( $unspecifiedYearScale === 0 ||
275275
( $this->needsYearEndingChar( $unspecifiedDigit ) && $specifiedYears !== 0 ) ) {
276-
return $this->humanizeYearSpecified( $date->getYear(), $unspecifiedDigit );
276+
return $this->humanizeYearSpecified( $year, $unspecifiedDigit );
277277
}
278278

279279
$specifiedYearsStr = (string)abs( $specifiedYears );

0 commit comments

Comments
 (0)