--- title: Repeating events description: An introduction to Calendite's rule language and the handful of forms that cover almost everything you'll want to schedule. order: 4 --- # Repeating events Calendite describes *when* something repeats with a short text rule. This page teaches the ideas and the forms you'll use most. For the exhaustive version, every form with worked examples, see the [rule reference](/docs/rules-reference.html). You never have to type a rule. The repeat sheet has ordinary pickers, and shows you the rule they compiled to; see [Building repeats](/docs/everyday-use/building-repeats.html) for that side of it. Reading the rule bar is the easiest way to learn the language. --- ## Three things first **1. Commas combine.** A schedule is a list of rules; the engine gathers the dates from each. ``` Mon, Thu → every Monday and every Thursday ``` **2. `!` removes.** A rule starting with `!` subtracts its dates. ``` WD, !BankHolidays → every weekday except bank holidays ``` **3. Order matters.** Rules apply left to right, adding and removing as they go. Put inclusions first and exclusions last. ``` WD, !Fri ✅ weekdays except Friday !Fri, WD ❌ removes Friday, then adds all weekdays back, so Friday returns ``` If a schedule has no positive rule at all, the event falls on its own start date. --- ## The everyday forms Day codes are `Mon Tue Wed Thu Fri Sat Sun`. Month codes are `Jan`…`Dec`. Both are capitalised exactly like that. | Rule | Meaning | |---|---| | `Day` | every day | | `Day3` | every 3 days | | `Fri` | every Friday | | `Fri2` | every 2nd Friday (fortnightly) | | `Weekly` / `Monthly` / `Yearly` | every week/month/year from the start date | | `Monthly2` | every 2 months | | `5Month` | the 5th of every month | | `-1Month` | the last day of every month | | `25Dec` | every 25 December | | `2Sat` | the 2nd Saturday of the month | | `-1Thu` | the **last** Thursday of the month | | `WD` / `WE` | every weekday / weekend day | | `2025-05-17` | that one date, and only then | `2Sat` is the 2nd *Saturday*. `2_Sat`, with an underscore, is the Saturday that falls in the 2nd *week*. They differ whenever a month starts mid-week. For February 2024, `2Wed` is the 14th but `2_Wed` is the 7th. Which days count as the weekend comes from your Country setting. --- ## Excluding things ``` Sat, !1Sat, !2Sat every Saturday except the first two of the month WD, !2025-12-25 every weekday, but not Christmas Day 2025 WD, !BankHolidays every working weekday ``` `BankHolidays` there is a **category**: a named set of dates that lives outside the rule. It only produces dates once you've given Calendite a source for it; see [Data sources and feeds](/docs/everyday-use/data-sources-and-feeds.html). --- ## Referring to your own events This is the part with no equivalent in other calendars. A rule can name a tag, an event series or a feed and use its dates: | Rule | Means | |---|---| | `Tag(Work)` | every day carrying the `Work` tag | | `Event(Work)` | the occurrence dates of the series named `Work` | | `Feed(BankHolidays)` | the dates a configured feed supplies | `Tag(Work)` and `Event(Work)` are different sets: one is every event sharing a tag, the other is one specific series. The rule names which you mean. The payoff is being able to pick out of them: ``` -1__Tag(Work)__OF__MONTH the last working day of the month ``` Here "working day" means whatever your Work events say. Change your shifts and the rule follows. > **Careful:** these need a data source. On their own they resolve to nothing, and an event > whose only rule is `Tag(Work)` with no Work events will never fire. --- ## Picking the Nth thing out of a period ``` {which}__{what}__OF__{period} ``` `{period}` is `DAY`, `WEEK`, `MONTH`, `YEAR`, or a specific month (`Jan`…`Dec`). `{what}` is `WD`, `WE`, a day code, a group like `(Mon.Wed.Fri)`, or a tag/event/feed reference. `{which}` is `1`, `-1` (counting from the end), a range `(1..5)`, a set `(1.3.5)`, or `ALL` (specific months only). | Rule | Meaning | |---|---| | `1__WD__OF__MONTH` | first weekday of the month | | `-1__Fri__OF__MONTH` | last Friday of the month | | `4__Thu__OF__Nov` | US Thanksgiving | | `ALL__Mon__OF__(Jan.Jul)` | every Monday in January and July | | `-1__Tag(Work)__OF__MONTH` | last work day of the month | --- ## The rest, briefly **Shift to a working day** with `~`. Useful when a fixed date lands on a weekend: ``` WD~<25Dec the weekday just before Christmas WD~=25Dec the nearest weekday to Christmas !WD~>25Dec the first non-weekday after Christmas ``` Note the type comes first: `WD~<25Dec`, not `25Dec~ Natural-language input is **Android only for now.** --- ## Ending a repeat Separate from the rule itself, in the form's **Ends** control: never, on a date, or after a number of occurrences. --- ## Cheat sheet | Want | Rule | |---|---| | Every weekday except bank holidays | `WD, !BankHolidays` | | Fortnightly team meeting on Wednesdays | `Wed2` | | Bin collection every other Tuesday | `Tue2` | | The 5th of every other month | `5Month2` | | Payday, last weekday of the month | `-1__WD__OF__MONTH` | | Payday, last actual working day | `-1__Tag(Work)__OF__MONTH` | | Every Saturday but not the first two | `Sat, !1Sat, !2Sat` | | Mondays and Thursdays, Q1 only | `Mon, Thu, LIMIT(Jan.Feb.Mar)` | | US Thanksgiving | `4__Thu__OF__Nov` | | Nearest weekday to Christmas | `WD~=25Dec` | | Friday the 13th | `13Month__&__Fri` | | Full moons | `MOON(FULL)` | | Good Friday, no feed needed | `EASTER(GoodFriday)` | --- ## Next - [Inner and variant events](/docs/everyday-use/inner-and-variant-events.html): schedules built on other schedules - [Data sources and feeds](/docs/everyday-use/data-sources-and-feeds.html): where `BankHolidays` comes from - [Rule reference](/docs/rules-reference.html): the complete syntax, every form and edge case