Datetime module, Drupal 8: I want to create a datetime field with year granularity. In Drupal 7, it was no problem. Now in Drupal 8, it isn't possible anymore. How can I create such a field without the Years Only module since it isn't safe? Can I write a theme function? If so, how do I do that?
Excerpt from the datetime.module:
/** * Defines the format that date and time should be stored in. */
const DATETIME_DATETIME_STORAGE_FORMAT = 'Y-m-d\TH:i:s';
/** * Defines the format that dates should be stored in. */
const DATETIME_DATE_STORAGE_FORMAT = 'Y-m-d';