Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When viewing webform reports with a date column, we'll see that this format isn't cutomizable form the UI. If we look the related code, we can see that reports use a 'small' date format that isn't a built-in date format in core:
format_date($submission->submitted, 'small')
We've to use a buil-in format like 'short' instead of 'small', that is no configurable unless we create a new date format with 'small' machine name.
Comment | File | Size | Author |
---|---|---|---|
#1 | small-date-format-1480788-1.patch | 1.51 KB | rvilar |
Comments
Comment #1
rvilarI attach a patch that replace 'small' date format with 'short' built-in.
Comment #2
quicksketchThanks, I thought at some point Drupal used "small" (which I agree is a dumb name), but I must have missed when that changed. Thanks for the patch, I'll take a look when I get a chance.
Comment #3
quicksketchThe related Drupal 7 change: #368408: Consistent date length nomenclature in format_date().
Even though in D6, the formats are called short, medium, and long in the UI, the format_date() function still takes small, medium, and large as the second parameter. Committed this patch to D7 only. Thanks for the patch!