This article introduces how to use the Moment.js library, listed on the Kintone CDN. It can be used to convert dates into different formats, such "xx days ago".
What is Moment.js?
Import Moment.js for you Kintone App
For more information on how to use the libraries in the CDN, refer to the How to Use the CDN article.
Use Moment.js with Kintone
Once the Moment.js library has been imported, it is possible to call the Moment.js methods within Kintone. Here are some examples:
Moment.js makes manipulating date formats very easy.
For more information on how to use the Moment.js library, refer to Moment.js documentation.
Moment.js sample on Kintone
Click Save and Update App to view the changes in the record list.
This code specifies a field code of a Datetime field in the App, and uses Moment.js to convert the date into a new format. The new format is placed in the record list instead of the original date format.