Problem/Motivation
Sometimes it’s necessary to use an unformatted field value, such as a node created date or publish date. There are date filters, but for the same reasons that date formats don’t work for AP Style, the twig filters don’t work.
Steps to reproduce
Use a raw date field or type value.
Proposed resolution
Create a twig filter to call the AP Style date formatter service.
Remaining tasks
Add config to ApStyleDateFormatter class to use as a default options for the formatTimestamp and formatRange functions.
Create twig extension service to use formatTimestamp.
In the future, options may be passed through the filter.
Issue fork date_ap_style-3221178
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 #4
shelane