Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292025

Consider making "date only" a separate @DataType

$
0
0

Problem/Motivation

I'm sure it's been noticed before, but #2926508: Add DateTimeNormalizer+TimestampNormalizer, deprecate TimestampItemNormalizer: @DataType-level normalizers are reusable by JSON API has shown quite clearly the awkward dance that we do to make "date only" datetime fields. We use datetime fields, but then treat/interpret them as "date only".

This means it depends on @FieldType-level configuration, which implies that core REST/Serialization, and also JSON API, GraphQL, Default Content and so on, need to be explicitly aware of this.

For a crystal clear example, see \Drupal\serialization\Normalizer\DateTimeIso8601Normalizer that is being added in #2926508-81: Add DateTimeNormalizer+TimestampNormalizer, deprecate TimestampItemNormalizer: @DataType-level normalizers are reusable by JSON API.

Proposed resolution

Introduce a new @DataType to represent dates.

Remaining tasks

TBD

User interface changes

None.

API changes

TBD

Data model changes

TBD


Viewing all articles
Browse latest Browse all 292025

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>