Relative vs absolute timeline in AEM as a cloud service | Community
Skip to main content
July 14, 2025
Solved

Relative vs absolute timeline in AEM as a cloud service

  • July 14, 2025
  • 2 replies
  • 357 views

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)

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Nilesh_Mali

@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>

 

2 replies

arunpatidar
Community Advisor
Community Advisor
July 14, 2025

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

 

Arun Patidar
Nilesh_Mali
Nilesh_MaliAccepted solution
Level 3
July 14, 2025

@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>