Adopt AnyDateFormatter from Codextended #109
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is dependent on Codextended PR #15. This draft PR will be updated to point to the new version of Codextended once that PR is merged and a new release is tagged.
This PR aims to solve the same issue as #77 and was inspired by @dpfannenstiel.
Why
As a website developer, I would like to use dates formatted according to the ISO 8601 standard.
Problem
Currently, a developer may specify a custom date formatter that is a
DateFormatter
. This solution prevents the use ofISO8601DateFormatter
since it inherits directly fromFormatter
instead ofDateFormatter
.Solution
This change adopts
AnyDateFormatter
from Codextended. This allows you to use etherDateFormatter
orISO8601DateFormatter
as thePublishingContext.dateFormatter
.This change should be the minimal set of changes required to support
ISO8601DateFormatter
as an option for developers. It should not introduce any breaking changes for current Publish users.