Problem/Motivation
#3490066: Add shorter date format (without time) and start using in announcements feed showed a need for a shorter date format without time, showing the date only. Several users agreed that it would be nice to offer this:
I agree a date format in core for date only (without time) would be good.
The task of adding the shorter date format in the announcements feed has been transferred to this issue:
@penyaskito:
[...] the change on announcements is a 1-line change in a template that we can fit on the other one, and is already approved by UX Lead and Product Manager, so shouldn't add any overhead.
Steps to reproduce
Open Administration > Configuration > Region and language > Date and time formats (/admin/config/regional/date-time) and see that all human readable date formats include time.
See the announcement feed, and think a shorter date format would be nice.
Proposed resolution
It would be nice to offer human readable date formats, without time:
| Name | Pattern |
|---|---|
| Default long date (date only) | Saturday, 11 January 2025 |
| Default medium date (date only) | Sat, 11 Jan 2025 |
| Default short date (date only) | 11 Jan 2025 |
It was considered to remove and deprecate Olivero Medium date format, but this is a bigger task, and will be handled in #3529846: Deprecate and remove Olivero Medium date format.
Remaining tasks
Add the three date formats above.Use "Default short date (date only)" in theannouncements.html.twigtemplate.- Review Change record Default date formats have been expanded with date only formats
User interface changes
- All sites offer shorter human readable date formats, without time, showing only the date.
- The announcement feed uses the short date-only date format.
After

API changes
Data model changes
Translations
| Comment | File | Size | Author |
|---|
Issue fork drupal-3498980
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ressaComment #3
ressaComment #4
ressaUpdate formats in Issue Summary.
Comment #6
ressaComment #7
ressaComment #8
smustgrave commentedGoing to have and look at this later. Not sure why migration test had to be updated
Comment #9
ressaThanks for looking at this so fast.
It's the function below. And since there are three more date formats, the
date_formatcount increases from 12 to 15:In:
/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.phpComment #10
smustgrave commentedSeems like a fine addition and no objection. I didn't see any recipe that was installing datetime formats
Also doesn't feel like something that would need test coverage as just offering more options.
Comment #11
ressaAt the risk of repeating myself, the Needs Review Queue Initiative is among the best things to happen to Drupal the last few years, and the community can't be grateful enough, so thank you @smustgrave!
Comment #12
catchVery minor but I'm wondering if these could be e.g. 'Medium date (without time)', rather than starting with 'no time'.
Since this is user-facing tagging for product manager review.
Comment #13
ressaThanks @catch, great suggestion and I updated the id's and labels. Perhaps you can review and check if "Needs Review" by product manager is still the case?
Comment #14
ressaUpdate format names in Issue Summary.
Comment #15
catch@ressa yes it changes out of the box behaviour so I think it could use it.
Comment #16
ressaSorry if it wasn't clear, I just meant that if it still looks good to you after my update, then you should feel free to change status to Needs Review :)
PS. I updated the Status, but of course feel free to revert, if after reviewing the new MR, you think it needs more work.
Comment #17
lauriiiSeems fine from product perspective. I've wondered several times myself why we don't have these out of the box 🥲
Comment #18
smustgrave commentedThank you @lauriii!
Comment #19
quietone commentedJust a few questions
Why is this change limited to new installs?
I did a fresh install with this MR and there are now two identical formats, 'Olivero Medium' and 'Short date (without time)'. I think that is confusing and should be addressed somehow.
And, can we use a more positive description, "Short date (date only)" instead of "Short date (without time)".
Setting to NW for responses to the above.
Comment #20
ressaThanks for the feedback @quietone, I have updated to use "(date only)" from "(without time)".
About "Olivero Medium" I am not sure, so I have updated the Issue Summary, with these Remaining tasks:
Comment #21
ressaComment #22
penyaskitoComment #23
ressaThanks for clearing that up so quickly @penyaskito, if you have time, feel free to update the MR with your suggestions. Maybe the update hook is safe to add, as a first step?
Comment #24
catchGood idea to remove the Olivero date format. My main concern with this issue is that it's a lot of default date formats, but if we're able to start getting rid of one-off ones, that's a good trade-off.
Comment #28
ressaI somehow managed to make an update hook for existing installations, so they now also get these date only formats. But only if there aren't pre-existing date formats with the same machine names.
I also removed Olivero Medium data format. It is replaced with the new Short date format, in the Olivero theme. Luckily, if for some reason a date format cannot be found, the fallback date format is used.
PS. I had to close the original branch, and start fresh, since rebasing was not possible. Oh, and Nightwatch had to be re-run three times, before it finally went green :)
Comment #29
penyaskitoSee MR comments.
Also tagging for required upgrade path tests.
Comment #30
ressaThank you very much @penyaskito for fast and thorough review, I greatly appreciate it.
I have made the changes you suggested, and your new method for setting the date formats were spot on, so that made it a lot easier. I also restored olivero_medium format.
As you suggested in the original Announcement issue, I have updated the date format to short_date_only in this MR as well.
I have updated Remaining tasks, and added the upgrade path test task as well. I wonder if there is a documentation page on how to write upgrade path tests, going from Drupal 10 to 11 (I guess)?
Comment #31
ressaJust updating the title, since the Announcement date update will also get done here.
Comment #32
ressaComment #33
catchI don't think we need an update here, they can just be available on new sites. Even if existing sites don't have formats with the same names, they may have all kinds of custom formats already created which are similar, and then suddenly these new ones would appear alongside them. Similarly we often don't even fix arguable bugs in shipped views like admin/content in update paths, because there is a higher chance of breaking a site than fixing it.
Comment #34
quietone commentedJust came back to this. My question,"Why is this change limited to new installs?" was truly a question. It was not an implication that any work was needed to change that decision. Apologies for the confusion.
Comment #35
penyaskitoOh, really? Then 🚀 ship it. @pameeela said this already, but I was pretty sure this was one of the core gates.
That means we need to actually remove that upgrade from this MR and we're done.
We don't need upgrade tests if there's no upgrade. Removing tag.
@ressa For the sake of learning, see https://www.drupal.org/docs/drupal-apis/update-api/writing-automated-upd...
Updated issue summary.
Only left: Revert
Add an update hook, so existing installations also get the new date only formats.Comment #36
ressaThanks for clearing that up @catch, and that's totally all right @quietone. As a side effect I realized what a useful feature the
ddev snapshotcommand is, to quickly roll back changes. I also learned a bit or two about making ahook_updateand runningphpcs, so it turned out to be a gain after all. I am pasting the end result below, just in case someone else needs to do something similar in the future. Thanks for the Doc page link @penyaskito!Unused
hook_updatecode:Comment #37
penyaskitoTested this locally and found the sorting in the listing a bit weird. I think it would be better to prefix the labels.
I won't do it myself so I can still RTBC.
PS: don't try to test on the MR tugboat because it doesn't trigger a new install.
Comment #38
penyaskitoComment #39
penyaskitoThanks for the quick response 😊
Comment #40
ressaYou're welcome! And great catch, the order is much better now.
Comment #41
mstrelan commentedThis is probably a duplicate of #2960821: Add default date formats without time but this has obviously had much more recent discussion. Perhaps someone could credit @dead_arm for the original issue I've just closed.
Comment #42
mstrelan commentedDo we need a CR for the new formats and the removal of Olivero Medium? We had one last time formats changed - https://www.drupal.org/node/3467774
In general I agree with removing Olivero Medium, but isn't it possible there are existing configs depending on this? I found at least 38 references in code after filtering out the cruft - https://git.drupalcode.org/search?group_id=2&scope=blobs&search=olivero_...
These tend to be in recipes, formatter config, views fields and tokens.
I think maybe we need a follow up to deprecate and remove it.
Comment #43
ressaGreat catch @mstrelan, and @penyaskito also noticed this ("
olivero_mediumshouldn't be deleted. We know how it's being used in core, but not how could be used in contrib/custom sites.")So In the end, "Olivero Medium" was not removed. The only Olivero theme-related change was Olivero theme using a new format:
But since the "Olivero Medium" date format stays, and you documented many more places where
olivero_mediumis in use, I removed the Olivero theme update as well. (And great way to use GitLab to search the code base of all contrib projects, BTW!)So now this MR only adds three new date only date formats, and updates the Announcements feed to use
short_date_only.But this may need a change record? I have created a draft Default date formats have been expanded with date only formats.
Comment #44
penyaskitoI'm not sure how we deprecate a config entity. But definitely we should have a specific change record for the olivero date format.
Comment #45
ressaBut the Olivero format is not touched, please check my last comment or the MR.
Comment #46
ressaAdding "Review Change record Default date formats have been expanded with date only formats" in Issue summary under Remaining tasks".
Comment #47
ressaI created #3529846: Deprecate and remove Olivero Medium date format.
Comment #48
penyaskitoIn #44 I expected that we would do the deprecation (but not the removal) here. That's why I suggested a new change record.
Comment #49
ressaAll right, perhaps it's most efficient, if you update the Issue Summary to more precisely reflect the remaining tasks? The other issue probably then also needs to be updated.
Comment #50
ressa@mstrelan and @penyaskito: I have added deprecating Olivero Medium in the Issue Summary here, and updated the Change Record with this:
Perhaps only the three new "date only" formats and deprecation Olivero Medium should be part of that Change Record, and the actual removal in a separate Change Record?
Comment #51
mstrelan commentedFWIW I think deprecation should be a separate issue and not even discussed here, make this easier to get in.
Comment #52
ressaThanks for a fast answer @mstrelan, and I agree -- getting this small change completed by itself would be optimal, and then dealing with the complicated stuff in a follow up issue. I have updated issues and Change Record.
Perhaps -- if you have time -- you could check the Change Record, which is the last remaining task? And I guess maybe also the MR, since it was updated 10 June 2025 to only add three new date formats, and update the date in the Announcements Feed.
Comment #53
smustgrave commentedTweaked the CR slightly for 11.3 rest seems fine to me!
Comment #54
ressaThanks @smustgrave!
Comment #55
quietone commentedI removed 'proposed' from the CR and added a screenshot to the issue summary.
Everything appears to be in order here.
Comment #56
xjmI can see adding one of these new formats, but adding three of them is essentially almost doubling the number of date formats. Perhaps we should just pick one to include? I find the new list kind of overwhelming. I think this would need usability review in addition to product signoff. (Meaning, we would want to add before-and-after screenshots and then tag it for usability review.)
Also, given that these are only being added to new installs, but we are also changing the production Twig template for the announcements feed, that could be a problem, no? So that might be a reason we actually would need an upgrade path, at least for the one that Announcements is now expecting to exist. No?
If folks are comfortable with adding just one date-only format, that change can be made and then we can go for a usability review. Otherwise, if folks feel strongly about adding all three, we should add the before screenshot and tag for usability review now.
Comment #57
ressaThanks for reviewing this @xjm. Looking at the list again, you have a point and I tend to agree ... Maybe we should only add a new short date without time format?
About an upgrade path for the announcements feed Twig template, you may be right ...
Comment #58
penyaskito#56: For context, this came from #3490066: Add shorter date format (without time) and start using in announcements feed, which came from Drupal CMS 1.0 dashboard designs (#3489989: Announcements date format in Drupal CMS Dashboard)
We needed just one date format. Before that,
announcementshad the same need, which happened in Olivero, because it didn't make sense to show the time when relevant announcements are quite spaced in time.Then it was about adding the 3 different date formats for consistency, which felt interesting.
This might be a very small thing and even feels embarrassing referring to the strategy, but #3533440: Drupal Core strategy: July 2025 mentions:
Having each module (like core announcements, Olivero, dashboard, Drupal CMS, or any of the future site templates) providing a single (or a couple of) date format(s) for fitting their needs can be even worse in terms of an overwhelming amount of date formats, plus producing design inconsistencies.
Having these three would reduce the chances of that.
Comment #59
smustgrave commented+1 for adding all 3
Comment #60
mstrelan commentedNW for #56:
I installed standard profile on 11.x HEAD, then applied the patch from this branch and ran db updates. Before the patch the dates looked like "19 Jun 2025 - 05:05" and after like "Thu, 19 Jun 2025 - 05:05". This is because
\Drupal\Core\Datetime\DateFormatter::formatuses the "fallback" format if the format doesn't exist. So while we're not breaking anything, we are making it worse for existing sites. So we should probably do an update hook to install one or all new formats, but only if there isn't an existing format with the same name.Comment #61
penyaskitoIn #33 we were told no upgrade path needed, which we had already written (see #36).
Now we are at 60 comments for amending some date formats.
Comment #62
catchI still think that adding all the formats to existing sites would be confusing (to be honest I also still think this issue could just add the one date format instead of three but I am neither a UX nor product manager).
If we need to add exactly one new date format, checking for existing formats with the same name, we could do that - but IMO that should only happen in the announcements feed module then, so that it only gets added for sites with that module enabled. This would not be the same update as the one that was removed after #33, maybe some of the logic can be re-used though.