'Show next open day' error if sunday is not first day of the week

Created on 20 November 2017, almost 8 years ago
Updated 15 November 2024, 10 months ago

"Show next open day" only works if sunday is the first day of the week. The setting of the field formatter is not taken into account:

<?php
// Are we currently open? If not, when is the next time?
// Remember: empty days are not in $items; they are present in $days.
if ($day <= $today) {
  // Initialize to first day of (next) week, in case we're closed
  // the rest of the week.
  if ($today == 0) {
    // Not for sundays, since this is already first day of the week.
  }
  elseif ($next === NULL) {
    $next = $day;
  }
}
?>
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland luksak

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024