@multisystemsuite/timezone-engine-business-hours
v5.0.0
Published
Regional business hours engine for @multisystemsuite/timezone-engine
Maintainers
Readme
@multisystemsuite/timezone-engine-business-hours
Regional business-hours engine for enterprise workforce scheduling, ERP attendance, and SaaS booking windows.
What it is used for
- Check if a datetime falls inside business hours for a timezone
- Regional workforce availability (US, EU, India, etc.)
- Gate notifications, cron jobs, and API actions to open hours
- HRMS / ERP shift and attendance modules
Install
npm install @multisystemsuite/timezone-engine-business-hoursUsage
import { businessHoursEngine } from "@multisystemsuite/timezone-engine-business-hours";
const hours = businessHoursEngine("America/New_York", {
start: "09:00",
end: "17:00",
days: [1, 2, 3, 4, 5], // Mon–Fri
});
const open = hours.isBusinessHour(new Date());
const day = hours.getLocalDay(new Date()); // 0=Sun … 6=SatWith React
import { BusinessHours, useBusinessHours } from "@multisystemsuite/timezone-engine-react";
function Status() {
const { isOpen, timezone } = useBusinessHours("Europe/London");
return <BusinessHours timezone={timezone} />;
}Key exports
| Export | Purpose |
| -------------------------------------- | --------------------------------- |
| businessHoursEngine() | Create engine for a timezone |
| BusinessHoursEngine.isBusinessHour() | Check if datetime is within hours |
| BusinessHoursEngine.getLocalDay() | Weekday in target timezone |
Related packages
@multisystemsuite/timezone-engine-scheduler— meetings and shifts@multisystemsuite/timezone-engine-react—BusinessHourscomponent
Keywords
timezone, business-hours, workforce, scheduling, enterprise, erp
License
MIT
