Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

habeuk_datetime

No security coverage 1 sites

This module provides a custom field formatter for datetime fields. It allows you to display dates with relative time indicators (like "1 month ago") and includes calendar and edit icons, with configurable options for creation and modification dates.

Habeuk DateTime

Provides a custom field formatter for datetime fields with relative time display ("1 month ago", etc.) and SVG icons.

Features

  • Custom field formatter for datetime, timestamp, created and changed fields
  • Displays creation and/or modification dates with calendar and edit icons
  • Relative time display (e.g., "1 month ago", "2 days ago")
  • Configurable settings per field instance
  • Responsive Bootstrap 5 markup

Requirements

  • Drupal 10 or 11
  • PHP 8.1+

Installation

Install as you would normally install a contributed Drupal module.

Composer

composer require drupal/habeuk_datetime

Manual

  1. Download the module and place it in the modules/custom/ directory
  2. Enable the module: drush en habeuk_datetime

Usage

  1. Go to Manage display of your content type (or other entity)
  2. For any datetime, timestamp, created or changed field, select Habeuk Datetime Metadata as the format
  3. Click the settings icon to configure:
    • Show creation date: Display the date the entity was created
    • Show modification date: Display the date the entity was last modified
    • Show relative time: Display relative time (e.g., "1 month ago")

Configuration

Each field instance can be configured independently with these options:

Setting Description Default Show creation date Display the creation date with calendar icon Yes Show modification date Display the modification date with edit icon Yes Show relative time Display "X time ago" next to the date Yes

Template

The module provides a theme hook habeuk_datetime_formatter that can be overridden in your theme:

templates/habeuk-datetime-formatter.html.twig

Variables

Variable Type Description entity Object The entity being displayed show_create_date Boolean Whether to show creation date show_update_date Boolean Whether to show modification date show_date_ago Boolean Whether to show relative time created_formatted String Formatted creation date created_relative String Relative creation time changed_formatted String Formatted modification date changed_relative String Relative modification time
Drupal 10–11

Ask your assistant about habeuk_datetime

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

Tracked releases
1
Tracked since
Jul 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.0 Stable 10–11 Jul 12, 2026