[1.6.x] Fixed #23665 -- Noted precedence of settings.USE_L10N in MONTH_DAY_FORMAT and YEAR_MONTH.

Backport of 4f90c99635149fae2f488c03f0b52303fe97e0aa from master