@multisystemsuite/timezone-engine-business-hours 3.0.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +61 -1
  2. package/package.json +12 -4
package/README.md CHANGED
@@ -1,3 +1,63 @@
1
1
  # @multisystemsuite/timezone-engine-business-hours
2
2
 
3
- Regional business hours engine.
3
+ Regional **business-hours engine** for enterprise workforce scheduling, ERP attendance, and SaaS booking windows.
4
+
5
+ ## What it is used for
6
+
7
+ - Check if a datetime falls inside business hours for a timezone
8
+ - Regional workforce availability (US, EU, India, etc.)
9
+ - Gate notifications, cron jobs, and API actions to open hours
10
+ - HRMS / ERP shift and attendance modules
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ npm install @multisystemsuite/timezone-engine-business-hours
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```typescript
21
+ import { businessHoursEngine } from "@multisystemsuite/timezone-engine-business-hours";
22
+
23
+ const hours = businessHoursEngine("America/New_York", {
24
+ start: "09:00",
25
+ end: "17:00",
26
+ days: [1, 2, 3, 4, 5], // Mon–Fri
27
+ });
28
+
29
+ const open = hours.isBusinessHour(new Date());
30
+ const day = hours.getLocalDay(new Date()); // 0=Sun … 6=Sat
31
+ ```
32
+
33
+ ### With React
34
+
35
+ ```tsx
36
+ import { BusinessHours, useBusinessHours } from "@multisystemsuite/timezone-engine-react";
37
+
38
+ function Status() {
39
+ const { isOpen, timezone } = useBusinessHours("Europe/London");
40
+ return <BusinessHours timezone={timezone} />;
41
+ }
42
+ ```
43
+
44
+ ## Key exports
45
+
46
+ | Export | Purpose |
47
+ | -------------------------------------- | --------------------------------- |
48
+ | `businessHoursEngine()` | Create engine for a timezone |
49
+ | `BusinessHoursEngine.isBusinessHour()` | Check if datetime is within hours |
50
+ | `BusinessHoursEngine.getLocalDay()` | Weekday in target timezone |
51
+
52
+ ## Related packages
53
+
54
+ - `@multisystemsuite/timezone-engine-scheduler` — meetings and shifts
55
+ - `@multisystemsuite/timezone-engine-react` — `BusinessHours` component
56
+
57
+ ## Keywords
58
+
59
+ `timezone`, `business-hours`, `workforce`, `scheduling`, `enterprise`, `erp`
60
+
61
+ ## License
62
+
63
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multisystemsuite/timezone-engine-business-hours",
3
- "version": "3.0.1",
3
+ "version": "5.0.0",
4
4
  "description": "Regional business hours engine for @multisystemsuite/timezone-engine",
5
5
  "license": "MIT",
6
6
  "author": "MultiSystemSuite",
@@ -35,9 +35,9 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "date-fns-tz": "^3.2.0",
38
- "@multisystemsuite/timezone-engine-core": "3.0.1",
39
- "@multisystemsuite/timezone-engine-scheduler": "3.0.1",
40
- "@multisystemsuite/timezone-engine-shared-types": "3.0.1"
38
+ "@multisystemsuite/timezone-engine-core": "5.0.0",
39
+ "@multisystemsuite/timezone-engine-scheduler": "5.0.0",
40
+ "@multisystemsuite/timezone-engine-shared-types": "5.0.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "rimraf": "^6.0.1",
@@ -45,6 +45,14 @@
45
45
  "typescript": "^5.7.2",
46
46
  "vitest": "^2.1.8"
47
47
  },
48
+ "keywords": [
49
+ "timezone",
50
+ "business-hours",
51
+ "workforce",
52
+ "scheduling",
53
+ "enterprise",
54
+ "erp"
55
+ ],
48
56
  "scripts": {
49
57
  "build": "tsup",
50
58
  "dev": "tsup --watch",