This project is not covered by Drupal’s security advisory policy.

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

Project information

  • Created by ekes on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases