Smart Time Ago will check and update the relative time every 60000 millisecond (60 seconds) in the scope you specify at the beginning. Latter it will check the newest time in your scope then tune the checking time interval to a proper value.

For example, if the newest time in the scope you specify is '2 hours ago'. There is no need to check and update the relative time every 60 seconds. Instead, Smart Time Ago will automaticly make the checking time interval longer to 30 minutes.

Rules:

The newest time is less than 44 minutes, the checking time interval will set to 1 minute.

The newest time is between 44 and 89 minutes, the checking time interval will set to 22 minutes.

The newest time is between 90 minutes and 42 hours, the checking time interval will set to 30 minutes.

The newest time is more than 42 hours, the checking time interval will set to half day.

It will create one TimeAgo instance to update the time elements in the div with timeLables class.

However you can also create TimeAgo instance for every time element separately like:

$('.timeago').timeago();

BTW if you need dynamic add the time element to your document without refreshing the page or you want to refresh the timeago manually. You might need call the refresh function to refresh the instance like:

The 'datetime' is the default attribute to put the ISO8601 absolute time to parse.

The 'up' in dir means the elements in your scope is display by time desc. which means if the dir sets to 'up'. Smart Time Ago will treat the first element's time as the newest time to adjust the time interval. Oppositely if it set to 'down', Smart Time Ago will treat the last element's time as the newewst time.

The 'ago' in 'suffix' means the relative generated by Smart Time Ago will look like '3 hours ago'.
If you want the text looks like '3 hours from now', you might need change the 'suffix' to 'from now'.

You can change the default configurations by passing the options to
timeago function when initialize timeago like: