Either as an expansion of an existing formatter or a new formatter, it should be possible to output events that repeat multiple times a day in a way that is more optimized. For example, grouped by day, listing only the times.

Potential features:

  • Group hourly, minutely recurring events by day
  • "Daily" listing that is not date specific?
  • configure days in the the past, future to show
  • option to show only start time for each instance
  • show duration if overridden?
  • option to show date inline vs above?

Comments

mandclu created an issue. See original summary.

mandclu’s picture

Issue summary: View changes
mandclu’s picture

Status: Active » Needs review
StatusFileSize
new12.94 KB
new86.36 KB

First attempt at implementing this, for both recurring-optimized formatters. Essentially, when dealing with a recurrence rule less than a day, the day is counted as an instance, and all the instances listed for the day.

mrpauldriver’s picture

After patching I am unable to view the manage display page at admin/structure/types/manage/event/display

Attempting to do result in a fatal error, with message below;

Fatal error : Trait 'Drupal \ smart_date_recur \ SmartDateRecurTrait' not found in /var/www/html/web/modules/contrib/smart_date/modules/smart_date_recur/src/Plugin/Field/FieldFormatter/SmartDateDateDailyRangeFormatter.php on line 30 .php

mandclu’s picture

StatusFileSize
new15.18 KB

Whoops, new patch to include the missing file.

mandclu’s picture

StatusFileSize
new15.18 KB

Found another small issue in my own testing, new patch.

mrpauldriver’s picture

I was seeing problems with the patch#5, but find that #6 applies without problems and the new display I see for the Daily Range and Recurring formatters is similar to that in the screenshot from #3

I think this works well, but it occurs to me that some uses cases may need a more complete listing, like that provided by the Smart Date Formatter and the same with duration.

More feedback from real usage in production would be helpful.

  • mandclu committed bc75de2 on 3.1.x
    Issue #3176302 by mandclu: Formatter for hourly/minutely recurring dates
    
mandclu’s picture

Status: Needs review » Fixed

That's a very valid perspective, but I know for myself I'd be cautious to use alpha-stability code in production. Merging in what we have for now, and will move the 3.1.x branch to a beta release. Please open a child issue if you have additional ideas on how this could be improved.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.