Add a formatter to show file upload date

Created on 15 November 2018, about 6 years ago
Updated 18 May 2024, 6 months ago

Problem/Motivation

Apart from file size, in some cases it's necessary to display the upload date too.

Proposed resolution

Create a new formatter specific for dates or modify the current formatter to allow users to modify display options (show only size, show only date, show both, ...).

For displaying file upload date use the following code as an starting point:

$date = \Drupal::service('date.formatter')->format($file->getCreatedTime(), 'short');

โœจ Feature request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain rcodina Barcelona

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

Merge Requests

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