Fix “today or yesterday” rendering for languages that do not put the weekday first
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 26 Apr 2023 09:54:31 +0000 (11:54 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 26 Apr 2023 10:02:31 +0000 (12:02 +0200)
commit1f7602bb1590b4ff357d3a758528ff5c921b293c
treef087809604d10b9b223c57b0a9ddc0c7392e6bcf
parent1fda2fbf49ddcd1d92244769291621895389296a
Fix “today or yesterday” rendering for languages that do not put the weekday first

The previous version was broken, because it just returned the name of the
weekday (`value`), but the time was missing entirely. The code was refactored
to move the “weekday first” check into refresh(), allowing languages that put
the weekday first to proceed as previously without any visual changes and other
languages to just use the absolute date + time. The diff likely looks larger
than it is for that reason.

Rendering was verified with de, en_US, en_GB, ar, he, el, ru, ja.
ts/WoltLabSuite/WebComponent/woltlab-core-date-time.ts
wcfsetup/install/files/js/WoltLabSuite/WebComponent.js