# How to use the library MomentJs

**URL:** <https://community.weweb.io/t/how-to-use-the-library-momentjs/2820>\
**Category:** Ask us anything\
**Created:** [May 25, 2023, 9:47pm UTC](https://community.weweb.io/t/how-to-use-the-library-momentjs/2820 "2023-05-25T21:47:21Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![raydeck](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raydeck/32/384_2.png) [@raydeck](https://community.weweb.io/u/raydeck)\
**Post date:** [May 27, 2023, 9:49pm UTC](https://community.weweb.io/t/how-to-use-the-library-momentjs/2820/7 "2023-05-27T21:49:40Z")

</div>

In luxon, the toRelative method gives you the kind of notation you are looking for: [DateTime | Luxon](https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html#instance-method-toRelative)

In the event you want to pull in, say, Luxon (which does this kind of date comparison and display job well) and you want access in the editor, paste the script tag you can get here: [https://cdnjs.com/libraries/luxon](https://cdnjs.com/libraries/luxon) into our weweb converter here: [https://weweb-embed.statechange.ai/](https://weweb-embed.statechange.ai/) to generate a custom javascript step you can put into your page load to have access to luxon.

---

_[View the full topic](https://community.weweb.io/t/how-to-use-the-library-momentjs/2820)._
