Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Content Translation Redirect Module content_translation_redirect crossed 1,000 active installs.

RFC9557

No security coverage
View on drupal.org

This module provides utilities for handling RFC9557 Date and Time data, including a data type, validator, Twig filter for internationalized dates, and model classes for date manipulation. It offers flexible validation modes and can be integrated by other modules needing RFC9557 compatibility.

Code for other modules to provide, or consume, RFC9557 Date and Time.

Provides:

  • TypedData type,
  • Validator,
  • Twig filter for outputting IntlDateFormatter internationalized dates,
  • Date Model classes for separating and manipulating the date parts,
  • An enum of ICU CLDR Calendars,
  • A helper class for manipulating the Locale string used by PHP.

This module can possibly be simplified if native PHP support is implemented.

Requirements & Installation

This module requires no modules outside of Drupal core. Installation as any normal module.

Use of Twig filter requires that the Intl PHP extension is installed.

Example usage

The tests provide examples of the model and utility classes, the Validator and the DataType. The Twig filter including using best pattern automation.

Validation

Validation provides two modes:
- RFC9557::MODE_STRICT will reject any mismatched offset with time zone
flagged as critical.
- RFC9557::MODE_NORMAL requires that the mismatch is resolved by the
implementing code.

Modules

Modules implementing RFC9557 Date data types or validation:

  • Xdate an extensible date field, supporting all RFC9557 date parts

Activity

Total releases
8
First release
May 2025
Latest release
1 month ago
Releases (12 mo)
5 ▲ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.0-beta2 Pre-release Jun 14, 2026
1.0.0-alpha7 Pre-release Jun 14, 2026
1.0.0-beta1 Pre-release Oct 27, 2025
1.0.0-alpha6 Pre-release Aug 10, 2025
1.0.0-alpha5 Pre-release Aug 9, 2025
1.0.0-alpha4 Pre-release Jun 4, 2025
1.0.0-alpha3 Pre-release Jun 1, 2025
1.0.0-alpha2 Pre-release May 3, 2025