There was one missing functionality in the Date Plugin, which is an ability to get relative times which you can do by passing the parameters into the function in the Moment.js library. But it looks like you can’t do that in the plugin itself, which is simply a part of writing mistake in the plugin’s source.
I see in the source you can actually pass some arguments into the plugin, and it should iterate those arguments into the moment()
function instead like this:
if(!window._alreadyLoadedDatePluginCode8934792) {
loadPluginCode();
window._alreadyLoadedDatePluginCode8934792 = true;
}
return moment(...args);
So now, getting relative times directly from the date plugin should work, just like what you would in the original Moment.js library. And there should also be a documentation somewhere in the plugin page.
Here’s my temporary fork of the plugin that can actually accept arguments, while the change hasn’t been made to the official yet:
https://perchance.org/vkauhn2zdw#edit