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
Ask your assistant about RFC9557
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0-beta2 | Pre-release | 11 | Jun 14, 2026 | ||
| 1.0.0-alpha7 | Pre-release | 11 | Jun 14, 2026 | ||
| 1.0.0-beta1 | Pre-release | 11 | Oct 27, 2025 | ||
| 1.0.0-alpha6 | Pre-release | 11 | Aug 10, 2025 | ||
| 1.0.0-alpha5 | Pre-release | 11 | Aug 9, 2025 | ||
| 1.0.0-alpha4 | Pre-release | 11 | Jun 3, 2025 | ||
| 1.0.0-alpha3 | Pre-release | 11 | Jun 1, 2025 | ||
| 1.0.0-alpha2 | Pre-release | 11 | May 3, 2025 |