Moment.js is quite a large library and seems to replicate some of the logic we have in mw.msg
In MobileFrontend. In Popups for example, this library is used to render a message "Edited 33 minutes ago", and this accounts for over 50% of the code. (See T137775)
rather than using Moment.js we use [[ https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/mobile.modifiedBar/time.js | a small library ]] to provide information about last modified time with units. We then use this information in getLastModifiedMessage to render one of several messages.
This approach seems cheaper.
My question: should we deprecate use of moment.js in core for a more simplistic library, based on the MobileFrontend library, that can be used with messages?