hughbris / grav-plugin-quando

Store and expose business opening and service-specific hours to Grav/Twig
MIT License
4 stars 0 forks source link

Consolidate regular opening hours in listing when they are the same consecutively #10

Open hughbris opened 6 years ago

hughbris commented 6 years ago

When we have, say, regular hour schedules in consecutive days that are the same, e.g.

regular:
  tuesday:
    - opens: "10:00"
      shuts: "13:00"
  wednesday:
    - opens: "10:00"
      shuts: "13:00"
  thursday:
    - opens: "10:00"
      shuts: "13:00"

Rather than outputting:

Tuesdays: 10am-1pm Wednesdays: 10am-1pm Thursdays: 10am-1pm

.. (somehow) be smart and output: Tuesdays-Thursdays: 10am-1pm

Although in terms of inline machine readability and microdata, this may be a fail.