Search.../

getBusinessSchedule( )

Gets the business hours of the site's business.

Description

The getBusinessSchedule() function returns a Promise that resolves to the site's corresponding business hours information.

The retrieved schedule is the schedule that has been entered in the General Info section of your site's Dashboard.

Syntax

function getBusinessSchedule(): GeneralInfoSchedule

getBusinessSchedule Parameters

This function does not take any parameters.

Returns

Fulfilled - An object containing the site business hours. Rejected - Error message.

Return Type:

Promise<GeneralInfoSchedule>
NAME
TYPE
DESCRIPTION
periods
Array<GeneralInfoSchedulePeriods>

List of opening and closing days and times.

specialHourPeriod
Array<GeneralInfoScheduleSpecial>

Special hours.

Was this helpful?

Get site business hours

Copy Code
1import wixSiteBackend from 'wix-site-backend';
2
3export function getBusinessSchedule() {
4 return wixSiteBackend.generalInfo.getBusinessSchedule();
5}
6
7/*
8 * {
9 * "periods": [
10 * {
11 * "openDay": "MONDAY",
12 * "openTime": "08:00",
13 * "closeDay": "MONDAY",
14 * "closeTime": "17:00"
15 * },
16 * {
17 * "openDay": "THURSDAY",
18 * "openTime": "09:00",
19 * "closeDay": "THURSDAY",
20 * "closeTime": "18:00"
21 * }
22 * ],
23 * "specialHourPeriod": [
24 * {
25 * "startDate": "31-12-2018",
26 * "endDate": "01-01-2019",
27 * "isClosed": true,
28 * "comment": "new year eve"
29 * }
30 * ]
31 * }
32 */