File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/PackagePrivate/Humanizer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments