Skip to content

Overnight windows

A block whose end time is earlier than its start time wraps across midnight automatically.

How it works

If you create a block from 22:00 to 06:00, the plugin treats it as two intervals on the same calendar evening: 22:00–24:00 on the chosen day, plus 00:00–06:00 the morning after. The "days of week" selection still applies to when the block starts.

Example

You want a "Closed - Overnight" image to show from 6 PM Friday to 8 AM Monday.

  1. Block 1: Fri, 18:00 to 23:59, "Closed" image.
  2. Block 2: Sat, 00:00 to 23:59, "Closed" image.
  3. Block 3: Sun, 00:00 to 23:59, "Closed" image.
  4. Block 4: Mon, 00:00 to 08:00, "Closed" image.

Or, simpler: use day-of-week + a single overnight wrap block per night, plus full-day blocks for Saturday and Sunday.

Edge cases

  • A block from 00:00 to 00:00 matches the entire day.
  • A block from 23:59 to 00:01 matches the last 60 seconds of the day plus the first 60 seconds of the next.
  • If two blocks overlap during the wrap, the earlier-listed block wins.