# Working days

{% hint style="info" %}
User permission: Administration > Working Days
{% endhint %}

{% embed url="<https://phocassoftware.wistia.com/medias/i968dnnp6c>" %}
Create a working days calendar
{% endembed %}

{% hint style="success" %}
Related pages:&#x20;

* [Periods (administration)](https://docs.phocassoftware.com/administration/periods-administration)
* [Change the data format](https://app.gitbook.com/s/itAvDF3MljQXV0rjHRP7/customize-your-view-analytics/change-the-data-format) (daily average in Analytics)
* [Publish a budget, forecast or data in another worksheet tab](https://app.gitbook.com/s/aNH5UMuZXBHuAbFF7nI2/owner-and-administrator/publish-a-budget-forecast-or-other-worksheet-tab) (Budgets and Forecasts)
  {% endhint %}

Working days calendars are useful when you want to calculate the [daily average](https://app.gitbook.com/s/itAvDF3MljQXV0rjHRP7/customize-your-view-analytics/change-the-data-format#changethedataformat-dailyaverage) in Analytics. Using working days, rather than days in calendar months, gives you more meaningful results. The average value is calculated by dividing the value in each period by the number of days in each period. So, for example, if there are 31 calendar days but only 25 working days in a month, using a calendar month will not accurately reflect the daily average value.

Working day calendars are also used in Budgets & Forecasts. You can [spread a total](https://app.gitbook.com/s/aNH5UMuZXBHuAbFF7nI2/contributor/edit-values-in-a-worksheet/spread-totals) proportionally according to a calendar, to account for seasonality across the budget or forecast period. You can also [publish a budget or forecast](https://app.gitbook.com/s/aNH5UMuZXBHuAbFF7nI2/owner-and-administrator/publish-a-budget-forecast-or-other-worksheet-tab) to a calendar, to split the budget period value proportionally by the number of days in that calendar period.

In the Phocas menu, click **Administration** > **Working Days**. The **Working Days** page displays a list of all your working day calendars. You can edit and delete these as required, and add new calendars.

<figure><img src="https://content.gitbook.com/content/vQCmtGTR7MsjcI62Vdki/blobs/ww2v5Pe3yGo4xRCKNr9H/3230729288.png" alt="" width="1117"><figcaption></figcaption></figure>

## Create a working days calendar <a href="#workingdays-createaworkingdayscalendar" id="workingdays-createaworkingdayscalendar"></a>

1. On the **Working Days** page, click **New**.
2. Enter the calendar details:
   * **Calendar Name**: Enter a unique display name.
   * **Start Year**: Specify the starting point for use in automatically generating working days. This is the start of the date range that the calendar covers.
   * **End Year**: Specify the endpoint for use in automatically generating working days. This is the end of the date range that the calendar covers.
   * **Exclude Weekends**: Select this checkbox if you do not want weekends to be included as working days when automatically generating working days.
3. Click **Save**.

   <div align="left"><figure><img src="https://content.gitbook.com/content/vQCmtGTR7MsjcI62Vdki/blobs/GoI9cNkqHKZxqVNSXEM3/619204" alt="" width="225"><figcaption></figcaption></figure></div>
4. Proceed to edit the new calendar to add non-working days or partial working days as required.

## Edit a calendar <a href="#workingdays-editaworkingdayscalendar" id="workingdays-editaworkingdayscalendar"></a>

The result of creating a working days calendar (above) is the addition of a calendar to Phocas for all the days in the specified date range, which might include weekends. The next step is to edit the default calendar setup to suit your needs. For example, you might want to:

* Exclude some days or mark some days as partial working days.&#x20;
* Completely change the setup to create a seasonality calendar. See [delete all days](#delete-all-days-in-a-calendar) below.&#x20;
* Edit an existing calendar if you make a mistake during setup or your circumstances change.

If you have just created a working days calendar, its setup page opens after you click **Save**. If you want to edit an existing calendar, on the **Working Days** page, click the calendar’s name (blue link) to open its setup page.

By default, a calendar' setup page opens on the **Calendar** tab, where you can change the calendar’s name, if required.

<div align="left"><figure><img src="https://content.gitbook.com/content/vQCmtGTR7MsjcI62Vdki/blobs/dH11XDmfLp8WH75vWcMG/3230795424.png" alt="" width="347"><figcaption></figcaption></figure></div>

Click the **Days** tab to set up the working days and change the hours in a working day. You can do this in two ways, using either the **Calendar** (default) view or **Grid** view.

<div align="left"><figure><img src="https://content.gitbook.com/content/vQCmtGTR7MsjcI62Vdki/blobs/Flw448APyEP8UMHC9S2G/3230795417.png" alt="" width="270"><figcaption></figcaption></figure></div>

### Calendar view <a href="#workingdays-calendarview" id="workingdays-calendarview"></a>

Use the **Calendar** view to quickly set the working days. Color coding differentiates the non-working days (blue) and partial working days (pale blue) from the working days (white). For example, in the image below, Saturdays and Sundays are non-working days, Tuesday 12 April is a half-day and all other days are working days.

* Use the date selector on the top right of the grid to move between the months in the calendar.
* Click a working day to change it into a non-working day. It turns blue.
* Click the day number in the corner of a day to open the **Working Day** window, where you can enter a value for more than or less than a single day to be allocated to a single calendar day. For example, 0.5 equals a half day.
* Use the date selector on the top right of the grid to move between the months in the calendar.
* Click a non-working or partial working day to change it back into a working day.

<figure><img src="https://content.gitbook.com/content/vQCmtGTR7MsjcI62Vdki/blobs/bJD46Z5rVtRVLWHnwnHe/619200.png" alt=""><figcaption></figcaption></figure>

### Grid view <a href="#workingdays-gridview" id="workingdays-gridview"></a>

Use the **Grid** view to add, edit and remove working days. The grid displays only the working and partial working days.

* Use the date selector on the top right of the grid to move between the months in the calendar or the page links at the bottom of the grid to move between the days. Alternatively, click the **Paginate** button at the bottom of the grid to view all the days on one page.&#x20;
* Click on a day to open the **Working Day** window, where you can enter a value for more than or less than a single day to be allocated to a single calendar day. For example, 0.5 equals a half day.
* Add a new working day: Click **New**.
* Remove a working day: Select its row and click **Delete**.

<figure><img src="https://content.gitbook.com/content/vQCmtGTR7MsjcI62Vdki/blobs/huN4G79ZGUJoYKkEXmOS/3230926499.png" alt="" width="802"><figcaption></figcaption></figure>

## Delete all days in a calendar

When you create a calendar, it is prepopulated with all the days in the period from the start year to the end year. This mightn't be desirable, especially if you want to set up a calendar for seasonality purposes. To populate the time periods (such as months) from scratch, you can quickly delete all the days in a calendar as follows:

1. Open the working days calendar page, click the **Days** tab, then switch to **Grid** view.
2. Click the **Paginate** button at the bottom of the grid to view all the days on one page.&#x20;
3. Select all the day rows and click **Delete**. As a result, you get a blank working days calendar, so you can now start from scratch. Proceed to add new working days to the calendar.

<figure><img src="https://content.gitbook.com/content/vQCmtGTR7MsjcI62Vdki/blobs/iwwd8nEr21HhYFa2iCf2/image.png" alt=""><figcaption></figcaption></figure>

## Set up a seasonal calendar

Seasonal calendars provide a way to adjust data to consider the impact of seasonal variations (such as holiday periods, special promotions, and so on) by defining the proportion of each period.

While not typically used in Analytics, seasonal calendars can be used in Budget & Forecasts to spread a total proportionally across the budget or forecast period. See the [Spread](https://app.gitbook.com/s/aNH5UMuZXBHuAbFF7nI2/contributor/edit-values-in-a-worksheet/spread-totals) page for more information and an example.

{% hint style="info" %}
Rebates has a different way of managing the [seasonal calendars](https://app.gitbook.com/s/MbR0klD6u5c0D9XeXtY3/seasonal-calendars) that apply to rules.
{% endhint %}
