Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Compact date/time range formatter

Security covered Under active development 2,762 sites

This module provides a more compact way to display date and time ranges by omitting repeated month or year information. It allows you to configure custom formats for date-only and date & time ranges, similar to how Drupal's core date formats work.

The compact date/time range formatter module provides the ability to display date/time range fields in a more compact form, by omitting the month or year where it would be duplicated.

Examples:
24–25 January 2017 (range is within a single month)
29 January–3 February 2017 (range is within a single year)
9:00am–4:30pm, 1 April 2017 (range is within a single day)

This module defines a new configuration entity, date_range_format, to store patterns for date range formats, in a similar way to Drupal's core date formats. Variations can be configured for use where the day, month or year is the same for both start and end date.

Both date-only and date & time ranges are supported.

To configure date/time range formats, visit Administration » Regional and language » Date and time range formats. The patterns use the same PHP date/time formatting tokens as Drupal's core date formats.

Important note if upgrading from 1.x-dev

There was no official 1.x release and there is no automatic upgrade path between 1.x-dev and 2.0. If you are upgrading from 1.x-dev, you should delete and recreate the date format configuration. More information is available here: #3226140: Upgrading from 1.x-dev to 2.x.

Drupal 10–11

Ask your assistant about Compact date/time range formatter

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

  • datetime_range Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Apr 2024
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.1.2 Stable 10–11 Jul 25, 2026
2.1.1 Stable 10–11 Aug 31, 2024
2.1.0 Stable 10–11 Apr 1, 2024