# Build the calendar and the hours

You lay down the timeslots of the edition (the shifts the solve will fill) and set when each stand is open. The calendar is kept on the *Calendar* page (*Prepare* menu entry), a stand's hours on its fiche. A **shift** is a real slice of work: there is no other kind of timeslot.

## Lay down timeslots: the generator and timeslots by hand

The grid is produced by one **generator**, the *Generate timeslots* menu, from one of three sources:

| Source | What it writes |
| --- | --- |
| *From the templates* | the shifts of each template on the dates assigned to it |
| *From the stands' opening hours* | a cut at every hour a stand opens or closes, a timeslot on every open stretch; added to the grid or in its place |
| *From a recurring pattern* | windows repeated on chosen days, added to the grid |

The gesture is the same whatever the source: a figures **preview** that writes nothing and says what the resulting grid would be worth, then the **application**. A **template** (« gabarit ») is what 3.x called a day template: the shifts of a kind of day, laid onto dates of the edition.

1. Open *Calendar* and define your templates ("weekday", "Saturday"...).
2. Lay them onto the edition's dates.
3. Read the preview: the template is applied as a difference, destroying nothing.
4. Apply.

Removing a date from a template's calendar does not delete its timeslots: they stay, the date is simply no longer governed. Templates can also be recognised in a grid that is already written (*Generate timeslots* menu). A single timeslot is added or edited by hand, in the list. The page describes the grid in place and shows its consistency check as a banner, re-read at each visit and after each write; each timeslot counts the open stands and the seats it carries.

## Set the stand opening hours

A stand's hours are set on its fiche (*Stands*, then its name), and nowhere else: there is no stand × timeslot grid any more.

- Its **recurring model**, at the top, says its normal regime ("every Saturday and Sunday from 10 am to 6 pm, headcount 2"); once saved, it is laid as plages on the days of the event.
- Its **dated plages**, below, are what the solve reads: one line per opening or closure, marked *model* or *entered* (added by hand). You add one, remove a plage or a whole day, and a plage laid by the model then removed by hand does not come back until the model changes. On a day with no plage, the stand is open all day.
- The fiche says how many open days and seats the stand carries, before any solve. A stand never open or a window outside every timeslot is counted on the home screen and in the calendar check.
- If someone edited the stand in the meantime, saving the model offers to refresh or overwrite knowingly.

An order or a heatwave that closes stands is laid by a consigne, not by editing the grid: [Apply a consigne from the authority](appliquer-une-consigne.md).
