@gainsnetwork/sdk 0.2.59-rc5 → 0.2.59-rc6

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.
@@ -15,17 +15,19 @@ const isCommoditiesOpen = (dateToCheck) => {
15
15
  const minute = now.minute;
16
16
  const isClosed =
17
17
  // Christmas 2023
18
- (month === 12 && dayOfMonth >= 25 && dayOfMonth <= 27) ||
18
+ (month === 12 && dayOfMonth >= 24) ||
19
19
  // New Year's Eve 2023
20
20
  (month === 1 && dayOfMonth >= 1 && dayOfMonth <= 2) ||
21
- // Friday Closing
22
- (weekday === 5 && hour >= 17) ||
21
+ // Friday Closing: After 4:30 PM (Friday is closed for the whole day after 4:30 PM)
22
+ (weekday === 5 && (hour > 16 || (hour === 16 && minute >= 30))) ||
23
+ // Sunday Closing: before 7:30 PM (closed until Sunday 7:30 PM)
24
+ (weekday === 7 && (hour < 19 || (hour === 19 && minute < 30))) ||
23
25
  // Saturday Closed
24
26
  weekday === 6 ||
25
- // Saturday Opening
26
- (weekday === 7 && hour <= 18) ||
27
- // Daily Closing
28
- hour === 17;
27
+ // Daily Closing: 4:30 PM to 6:30 PM (every day except Friday after 4:30 PM)
28
+ (hour === 16 && minute >= 30) || // 4:30 PM to 5:00 PM
29
+ hour === 17 || // 5:00 PM to 6:00 PM
30
+ (hour === 18 && minute <= 30); // 6:00 PM to 6:30 PM
29
31
  return !isClosed;
30
32
  };
31
33
  exports.isCommoditiesOpen = isCommoditiesOpen;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gainsnetwork/sdk",
3
- "version": "0.2.59-rc5",
3
+ "version": "0.2.59-rc6",
4
4
  "description": "Gains Network SDK",
5
5
  "main": "./lib/index.js",
6
6
  "files": [