Commit 8cad6f13 authored by John Voskuilen's avatar John Voskuilen
Browse files

Issue #3063213: Time format: Add hook for custom format - README.txt

parent 78f93d76
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -17,9 +17,9 @@ The formatter provides o.a.:
- options to group days (E.g., "Mon-Fri 12:00-22:00");
- customizable element separators to display the 'office hours' any way
  you want. (See below for details.)
- (as per v8.x-1.7) an ability to determine the 'Exception days' to
  display in the future.
- (as per v8.x-1.7) separate css class for the 'current' slot.
- a drop-down formatter with current time,
  that shows all hours upon clicking on it. (v8.x-1.7)
- separate css class for the 'current' slot. (v8.x-1.7)

You can configure the formatter as follows:
- Add the field to an entity/node;
@@ -42,6 +42,15 @@ the hours any way you want.
    2:10:00:18:00,3:10:00:18:00,4:10:00:18:00,
    5:10:00:18:00,6:10:00:18:00,7:12:00:20:00

== FORMATTING THE HOURS - ALTER HOOKS ==
Alter_hooks are introduced and documented in office_hours.api.php:
 - hook_office_hours_time_format_alter(string &$formatted_time) (v8.x-1.7)
   allowing to change the time format, and/or insert a translatable text,
   in order to change the formatted hours to your organization's needs.
 - hook_office_hours_current_time_alter(int &$time, $entity)    (v8.x-1.7)
   allowing to change the 'current' (user) time,
   in order to change the isOpen indicator (and Current day formatter).


== USING VIEWS - FIELDS ==
Add the Field to any Views display, as you are used to do.
@@ -107,6 +116,7 @@ You'll see the Office hours in the page AND in the block. That's once too often.
 - Select the Office_hours, and set the Format to 'Hidden';
 - Save the data, end enjoy the result!


== D7: IMPORTING WITH FEEDS MODULE ==
To import data with the Feeds module, the following columns can be used:
- day;