Skip to content

Draft: Extend dateformat lib file to handle dates better

Lukas 'ai-pi' Eipert requested to merge leipert-improve-dateformat-proposal into master

What does this MR do and why?

At times we use masks like dd mmm when semantically we actually just want the "short month" name + "days". Different languages have different order of month / day, so tying the order to be fixed seems kind of bad (see: !96376 (closed))

Luckily we could use the browser APIs for this, namely Intl.DateTimeFormat's format option. Eventuelly we could use it to replace dateformat completely if we find a good mapping for any dateformat mask we currently use. Might even enable us to reduce the amounts of masks we use.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lukas 'ai-pi' Eipert

Merge request reports