Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

office_hours

18,732 sites Security covered
View on drupal.org

Defines a 'weekly office hours' field type, allowing you add a field to any Content type, in order to display when a location is open or closed on a weekly basis.
In Version 8, you can also add Exception days, specifying a Date.

Please check the Field settings, Formatter settings and Widget settings to explore all features!

See this nice use case, that shows how you can maintain and publish changing opening hours in advance. In the meantime, we are working on #1743366: [Season Meta] Add "Seasonal Hours / Duration" feature

Drupal Modules: The One Percent has posted a nice, but fairly old tutorial (nov 2016)
Lullabot produced a review in their Module Monday series (aug 2014): Module Monday: Office Hours
Or check out the more recent review by Talking Drupal Newsletter #444 from april 2024 (Direct link to video)

Hot topics

Some help is appreciated for the following topics:
Add schema.org/openingHours microdata
Add timezone feature
#3218101: Add PHPUnit tests

Functionalities

    The module defines a field type, and the following widgets:
  • a 'List' widget allows to add a timeslot day by day. (it is not recommended to use this. It is mainly used to test functionality against a close-to-standard widget.)
  • a 'Week' widget shows all days of the week at once,
  • a 'Week with exceptions' allows to additionally add exception dates, where office hours are different from normal weekdays (holiday, Christmas).
    The widget provides:
  • 'allowed hours' restrictions;
  • input validation;
  • use of either a 24 or 12 hour clock;
  • using 1, 2 or even more 'time blocks' per day;
  • a comment per time slot (E.g., 'First friday of the month');
  • links to easily copy or delete time slots.
    The formatter provides:
  • an 'open now'/'closed now' indicator (formatter);
  • options to group days (E.g., "Mon-Fri 12:00-22:00").
  • options to maintain 'Exception days'. (v8.x-1.7)
  • options to display a 'Select List', that can be opened/closed. (v8.x-1.7)
  • integration for openingHours metadata from schema.org
  • integration for openingHoursSpecification metadata from using the Schema.org Metatag module (v8.x-1.6)
  • a hook to alter the formatted time (see office_hours.api.php) (v8.x-1.7).
  • a hook to alter the 'current' time for timezones (see office_hours.api.php) (v8.x-1.7).

This allows you to easily create your own display. For example, next to the 'normal' tabular layout or text format, you can create a view to export the data to a Google Places bulk upload file.

Dependencies

This module depends on the Date module.

Activity

Total releases
7
First release
Feb 2025
Latest release
3 months ago
Release cadence
51 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
8.x-1.29 Stable Dec 30, 2025
8.x-1.28 Stable Apr 19, 2025
8.x-1.27 Stable Apr 3, 2025
8.x-1.26 Stable Mar 24, 2025
8.x-1.25 Stable Mar 24, 2025
8.x-1.24 Stable Mar 24, 2025
8.x-1.22 Stable Feb 26, 2025