Consider deprecating TimestampAgoFormatter

Created on 22 January 2018, almost 7 years ago
Updated 3 March 2023, almost 2 years ago

Problem/Motivation

Split from πŸ› Allow TimestampFormatter to show as a fully cacheable time difference with JS Fixed . Postponed on πŸ› Allow TimestampFormatter to show as a fully cacheable time difference with JS Fixed .

As πŸ› Allow TimestampFormatter to show as a fully cacheable time difference with JS Fixed has extended TimestampFormatter to allow "timeago" representation using JS and making it in this way fully cacheable, we should consider the deprecation of TimestampAgoFormatter plugin and its removal in Drupal 9.

Pros for deprecating:

  • The new "timeago" option from TimestampFormatter allows full caching while TimestampAgoFormatter assures only a max-age caching.
  • Non HTML consumers (for REST or non-HTML views) are getting outdated data like a max-age cached 'time ago' interval? That has no value for a service consumer as it has no value for a user that reads a HTML in the browser.
  • Deprecated doesn't mean it will not continue to work. The formatter will be available for the entire life cycle of Drupal 8.x. However, deprecating it will tell the consumers to update their client software and compute themselves the interval.

Cons:

  • Non-JS browsers will receive a date formatted value rather than an interval.
  • Formatters get used in other places (Views outputting something other than HTML, REST, etc).

Proposed resolution

Remaining tasks

None.

User interface changes

TBD

API changes

TBD

Data model changes

TBD

πŸ“Œ Task
Status

Active

Version

10.1 ✨

Component
DatetimeΒ  β†’

Last updated 6 days ago

Created by

πŸ‡·πŸ‡΄Romania claudiu.cristea Arad πŸ‡·πŸ‡΄

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024