Practical guide

Last Weekday vs Last Business Day: Calendar Recurrence Rules

A last-weekday recurrence knows the selected weekdays, not your holiday calendar. Excluding a closure removes an event; it does not automatically move it to the previous open day. Separate the weekly rule from your organization’s dated closure and replacement policy.

Calendar users checking event rules and practical date choices · 5 minute read · Published

A weekday is not a complete business calendar

For a Monday–Friday schedule, FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1 selects the last date in that month’s weekday set. It does not contain a country, employer, service-hours calendar or holiday list. RFC 5545 uses this pattern as a last-work-day example, but the rule itself only knows its listed weekdays. [1]

If your service works Sunday–Thursday, those are the weekday candidates you must supply instead. If the service has rotating days, half-days or cutoffs, a fixed five-day selector cannot represent every condition. Establish the controlling organization and its rule before calling the result a business deadline.

Select candidates first, then take the final one

With FREQ=MONTHLY, BYDAY builds the month’s Monday–Friday candidates and BYSETPOS=-1 takes the last candidate. Without BYSETPOS, the rule selects all listed weekdays. A last Friday rule such as BYDAY=-1FR instead selects only Fridays and can produce an earlier date. [1]

Use a DTSTART that already matches the selection. The practice series starts on Friday, 29 January 2027, the last Monday–Friday date in January. A start on January 31 would not match this rule. Inspect a month ending on Saturday or Sunday as well as one ending on a weekday.

Trace a fictional closure that changes the answer

On a narrow screen, swipe within the table to read the remaining columns.

Original example: Monday–Friday schedule; fictional closure on 31 March 2027
MonthLast weekdayAfter EXDATE onlyIf policy says previous open day
JanuaryFriday 29 January29 January29 January
FebruaryFriday 26 February26 February26 February
MarchWednesday 31 MarchNo March eventTuesday 30 March

March 31 is a chosen fictional closure, not an announced holiday. EXDATE subtracts that occurrence from the recurrence set. The rule does not rebuild its weekday candidates after the subtraction, so March 30 does not appear automatically. [2]

The last column assumes the organization explicitly requires the previous included whole date and that March 30 is open. If both March 30 and 31 are closed, inspect March 29 next. Do not silently use this backward rule where the actual instruction says the next business day.

An explicit exclusion and replacement example

This file removes the fictional March 31 occurrence and adds March 30 with RDATE. Both are DATE values, matching DTSTART. Inclusion plus exclusion is a set operation; RDATE does not carry evidence that an organization authorized the replacement. [3]

Download practice last weekday with replacement (.ics)

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//DayMoon Calendar//Fictional Examples 1.0//EN
BEGIN:VEVENT
UID:cc41e62be5969cebc4aa7e16@daymooncalendar.com
DTSTAMP:20261108T000000Z
DTSTART;VALUE=DATE:20270129
SUMMARY:Practice - Fictional month end
RRULE:FREQ=MONTHLY;COUNT=3;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1
EXDATE;VALUE=DATE:20270331
RDATE;VALUE=DATE:20270330
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR

The final dates are January 29, February 26 and March 30. If you remove the RDATE line, the final set has only January and February. COUNT=3 applies to the generated rule, not a promise that exclusions leave three visible entries.

Build a real schedule from real included dates

Obtain the current organization calendar for the relevant year. Write its excluded weekdays, additional closure dates and chosen backward-or-forward adjustment. For each month, enumerate valid included dates under that policy and select the required one. Retain the date and scope of the underlying notice with the result.

Then encode the explicit selected dates or apply carefully reviewed recurrence exceptions. A simple annual list of independently confirmed RDATE values can be clearer than a rule with many exceptions. RDATE and RRULE values are united, duplicates count once, and EXDATE takes precedence over both. [2]

The existing business-day guide explains different weekend masks and included endpoints. Its offset method can help verify a previous-open-date policy, but your recurring file still needs the correct concrete replacement dates.

Two complete decisions

March 31 is closed and I add EXDATE. Will the event move to March 30?

No. The March event is removed unless you explicitly encode a replacement.

BYSETPOS selected March 31 before EXDATE was applied. If your confirmed policy is the previous open day and March 30 is open, add March 30 as a matching DATE-valued RDATE or use a correctly constructed exception. Do not infer a holiday-aware fallback from the weekday rule.

The organization operates Sunday–Thursday. Is the Monday–Friday pattern still a safe default?

No. It selects the wrong weekly candidate set.

Use the organization’s actual included weekdays and then its extra dated closures. A result can happen to match in one month while being wrong in another. Validate a Friday/Saturday month-end boundary and the actual closure list before relying on the schedule.

Verify the result, not only the rule’s name

Compare at least one weekend-ending month, one extra closure and one month with no closure. Confirm that each selected date is genuinely open under the stated policy. Calendar import support and service-hour rules need their own checks; this is a whole-date scheduling example, not a legal, payroll or transaction deadline determination.

Sources and further reading

  1. RFC 5545 §3.3.10 — Recurrence valueFrequency, intervals, ordinal weekdays, set positions, count/cutoff and invalid generated dates.
  2. RFC 5545 §3.8.5.3 — Recurrence setDTSTART synchronization, inclusion/exclusion precedence and documented examples.
  3. RFC 5545 §3.8.5.2 — RDATEExplicit added dates, matching DATE values and union semantics.
  4. RFC 5545 §3.8.5.1 — EXDATERemoved dates take precedence; no automatic rescheduling.