Drupal 8/9 time ago date format

For example, in Drupal the comment created time is displayed like Thu, 02/12/2021 - 23:04. We can change the format to look like 1 weeks 4 Days ago or 16 min 37 sec ago.To Change the date format for comment using hook_preprocess_comment().
copy-icon
copy-icon

Comments

Authors

Read Next