getBusinessSchedule( )


Gets the business hours of the site's business.

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.

Method Declaration
Copy
function getBusinessSchedule(): Promise<GeneralInfoSchedule>;
Request
This method does not take any parameters
Returns
Return Type:Promise<GeneralInfoSchedule>
Get site business hours
JavaScript
import { Permissions, webMethod } from "wix-web-module"; import wixSiteBackend from "wix-site-backend"; export const getBusinessSchedule = webMethod(Permissions.Anyone, () => { return wixSiteBackend.generalInfo.getBusinessSchedule(); }); /* * { * "periods": [ * { * "openDay": "MONDAY", * "openTime": "08:00", * "closeDay": "MONDAY", * "closeTime": "17:00" * }, * { * "openDay": "THURSDAY", * "openTime": "09:00", * "closeDay": "THURSDAY", * "closeTime": "18:00" * } * ], * "specialHourPeriod": [ * { * "startDate": "31-12-2018", * "endDate": "01-01-2019", * "isClosed": true, * "comment": "new year eve" * } * ] * } */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?