Skip to content

Commit

Permalink
fix static
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-topway-it authored and JeroenDeDauw committed Jan 17, 2023
1 parent 0d6a4e6 commit edb98e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PackagePrivate/Humanizer/InternationalizedHumanizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private function humanizeDateWithoutUncertainty( ExtDate $date ): string {
$day = $date->getDay();

if ( $year !== null ) {
$year = $this->humanizeYear( $date );
$year = $this->humanizeYear( $year, $date );
}

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

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

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

$specifiedYearsStr = (string)abs( $specifiedYears );
Expand Down

0 comments on commit edb98e4

Please sign in to comment.