How to prevent re-render timeago a month ago - Minute and year working

I’am searching and change plugin version but i can’t find solution, minutes and year not flashing, but months ago dom flashing and re-render timeago

TimeAgo plugin:

<script src=""></script>

Dom Elements:

<time datetime="2022-04-22T18:59:31+02:00"></time>

Render All time elements:


This is what it show on github.

import { render, cancel } from 'timeago.js';

const nodes = document.querySelectorAll('.timeago');

use render method to render nodes in real time
render(nodes, 'zh_CN');

And this function cancel(); cancel all real-time render task.

or cancel for the specific one

In your case should be something like this :


Here it shows how to use : Demo page

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.