-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
Description
Description of the bug
Having a View with a Date Of Birth (DOB) date field, and using the formatted "Time ago" does not calculate the correct birthdate.
For example... a date of birth as 16th February 1944 is being shown as 82 years 4 days with an "interval" of 2.
The actual birthdate should be 81 years 348 days, based on a NOW date of 30 Jan 2026
Steps To Reproduce
To reproduce the behaviour:
- Create a content type with a date field - add a date to the content type in the past, i.e. 16 Feb 1944
- Create a view and add the date field
- Configure the Views field as
- "Formatter" = "Time ago"
- "Display" = Time Ago
- "Interval" = 2
Expected behaviour
The values displayed should be 81 years 348 days
Additional information
Curtesy of @indigoxela
The function being called to calculate the date
https://github.com/backdrop/backdrop/blob/1.x/core/includes/common.inc#L2592
Possible fix
https://www.drupal.org/project/drupal/issues/2744597
Reactions are currently unavailable