Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

Relative vs absolute timeline in AEM as a cloud service

Avatar

Level 1

In the cloud instance, we have seen the timeline feature sometime displays in relative format and sometimes in absolute format. Can you please let me know what's the logic behind showing the timeline in relative vs absolute terms? Is there a specific number of days where the timeline will be shown in relative (ex: 3 days ago, 2 hours ago etc) and beyond that it will be shown in absolute terms (ex: 7/2/25, 2:33 PM etc)

1 Accepted Solution

Avatar

Correct answer by
Level 4

@damodar_raju 

 

Relative vs. absolute timestamps is controlled by the foundation-time component's underlying logic, which uses Coral UI's Coral.TimeAgo,

Specifically:

Timestamps ≤ 7 days old are shown in relative format:
e.g., “3 hours ago”, “5 days ago”

Timestamps > 7 days old are shown in absolute format:
e.g., “Jul 2, 2025, 2:33 PM”

 

This behaviour is client-side and powered by JavaScript.
It is not based on any AEM-specific Java back-end logic but relies on rendering by the Coral UI framework and the foundation-time element inside

clientlib:
/libs/granite/ui/components/coral/foundation/clientlibs/foundation/js/time/init.js

 

You can check the same with

<coral-timeago datetime="2025-07-02T14:33:00Z"></coral-timeago>

 

View solution in original post

2 Replies

Avatar

Community Advisor

Hi @damodar_raju 

I think its 7 days. The DOM element which used to represent date in timeline is foundation-time 

 

Clientlibs : /libs/granite/ui/components/coral/foundation/components/clientlibs/components

arunpatidar_0-1752483329221.png

 

Arun Patidar

AEM LinksLinkedIn

Avatar

Correct answer by
Level 4

@damodar_raju 

 

Relative vs. absolute timestamps is controlled by the foundation-time component's underlying logic, which uses Coral UI's Coral.TimeAgo,

Specifically:

Timestamps ≤ 7 days old are shown in relative format:
e.g., “3 hours ago”, “5 days ago”

Timestamps > 7 days old are shown in absolute format:
e.g., “Jul 2, 2025, 2:33 PM”

 

This behaviour is client-side and powered by JavaScript.
It is not based on any AEM-specific Java back-end logic but relies on rendering by the Coral UI framework and the foundation-time element inside

clientlib:
/libs/granite/ui/components/coral/foundation/clientlibs/foundation/js/time/init.js

 

You can check the same with

<coral-timeago datetime="2025-07-02T14:33:00Z"></coral-timeago>