How relative-human readable time works for Date Time field in JIRA

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When you use Date fields JIRA like Created, Updated or any other custom field type of Date Time Picker you can see that actual date is replaced with what is also called relative dates like: Just now, x minute ago, x days ago and 1 week ago.

It may be confusing how this human readable date is calculated, so we give some examples:

  • Up to 50 minutes it will calculate minutes

  • From 50 to 90 minutes it will tell 1 hour ago

  • Within the same day and up to 1 day it will tell x hours ago

  • For date from yesterday it will tell Yesterday

  • Up to 8 days it will tell x days ago (but min - 2 days)

Some specifics about x days ago. It will be calculated from the current time not from start of day and rounded down to full number of days.

(Auto-migrated image: description temporarily unavailable)

A couple of examples: let's assume that Today is 2015-08-18 12:00

  • At 2015-08-17 11:00 - Yesterday

  • At 2015-08-16 18:00 - 2 days

  • At 2015-08-16 11:00 - 2 days

  • At 2015-08-15 18:00 - 2 days

  • At 2015-08-15 11:00 - 3 days

  • At 2015-08-14 18:00 - 3 days

  • At 2015-08-14 11:00 - 4 days

Details:

Date modification is done n JavaScript, It will parse any 'livestampdata' DOM object. This is the snipet of the code which doing days calculations:

1 2 3 4 5 6 7 8 ;/* module-key = 'jira.webresources:jquery-livestamp', location = '/includes/jquery/plugins/livestamp/time.js' */ .. case "xDaysAgo": return AJS.format("{0} days ago", param); } else { if (date > now.clone().subtract("d", 7)) { return getTextForRelativeAge("xDaysAgo", type, Math.max(getDaysBetween(date, now), 2)) } else {

And function getDaysBetween looks like:

1 2 3 function getDaysBetween(start, end) { return Math.floor(end.diff(start, "days", true)) }

Disabling Relative Dates

It may makes sense for some systems to disable relative dates and display standard date formats. This can be done as mentioned here: Display standard dates in Jira server

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.