@discomedia/utils 1.0.20 → 1.0.21

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.
@@ -13585,7 +13585,7 @@ class MarketCalendar {
13585
13585
  const yearHolidays = marketHolidays[year];
13586
13586
  if (!yearHolidays)
13587
13587
  return false;
13588
- return Object.values(yearHolidays).some(holiday => holiday.date === formattedDate);
13588
+ return Object.values(yearHolidays).some((holiday) => holiday.date === formattedDate);
13589
13589
  }
13590
13590
  /**
13591
13591
  * Checks if a date is an early close day in NY time.
@@ -13668,7 +13668,9 @@ function getLastFullTradingDateImpl(currentDate = new Date()) {
13668
13668
  marketCloseMinutes = MARKET_CONFIG.TIMES.EARLY_CLOSE.hour * 60 + MARKET_CONFIG.TIMES.EARLY_CLOSE.minute;
13669
13669
  }
13670
13670
  // If not a market day, or before open, or during market hours, return previous market day's close
13671
- if (!calendar.isMarketDay(currentDate) || minutes < marketOpenMinutes || (minutes >= marketOpenMinutes && minutes < marketCloseMinutes)) {
13671
+ if (!calendar.isMarketDay(currentDate) ||
13672
+ minutes < marketOpenMinutes ||
13673
+ (minutes >= marketOpenMinutes && minutes < marketCloseMinutes)) {
13672
13674
  const prevMarketDay = calendar.getPreviousMarketDay(currentDate);
13673
13675
  let prevCloseMinutes = MARKET_CONFIG.TIMES.MARKET_CLOSE.hour * 60 + MARKET_CONFIG.TIMES.MARKET_CLOSE.minute;
13674
13676
  if (calendar.isEarlyCloseDay(prevMarketDay)) {