Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

edtf

4 sites No security coverage
View on drupal.org

This module adds a date field with support for the Extended Date/Time Format specification (EDTF). This allows varying precision, uncertain and approximate (date or) timestamps. Internally the timestamp will be saved as string. The ProfessionalWiki/EDTF library is used for validating and parsing.

Examples

  • 2023-12-24T18:00:00Z - On December 24, 2023 at 6PM in UTC
  • 2023-12-24T18:00:00 - On December 24, 2023 at 6PM in unspecified timezone
  • 2023-12-24 - The date "December 24, 2023"
  • 2023-12 - In the month December 2023
  • 2023-12-XX - on an unknown date in December 2023
  • 202x-12-24 - on December 24 in an unknown year in the 2020s
  • 2023? - it might have been in 2023, but it is uncertain
  • 2023-12~ - approx. in December 2023
  • 2023-12-01/2023-12-24 - the interval December 1st to 24th in 2023

API

When displaying timestamps, two formatters are available:

  • Plain: the timestamp will be shown as is
  • EDTF Humanizer: The humanizer of this library is used.

This module adds field tokens:

  • [node:field_name:year] - show only the specified year
  • [node:field_name:year_period] - show the specified year with 'X' in place of rightmost unspecified digits (e.g. '19xx')
  • [node:field_name:humanized] - the timestamp in humanized form

This module adds a few Twig filters for processing EDTF values:

  • {{ value|edtf_validate }} - check whether the value is valid (returns boolean).
  • {{ value|edtf_humanize }} - humanize the value in the current language (returns string or null if the value was not valid).
  • {{ value|edtf_year }} - returns the (minimum) year (returns int or null if the value was not valid).
  • {{ value|edtf_year_period }} - returns the year with 'X' in place of the rightmost unspecified digits (returns string or null if the value was not valid).
  • {{ value|edtf_min }} - returns the earliest UNIX timestamp (returns int or null if the value was not valid).
  • {{ value|edtf_max }} - returns the latest UNIX timestamp (returns int or null if the value was not valid).

Activity

Total releases
1
First release
Oct 2025
Latest release
6 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev Oct 17, 2025