@open-tender/utils 0.4.58 → 0.4.59

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.
@@ -147,7 +147,7 @@ const getRevenueCenterStatus = (revenueCenter, serviceType) => {
147
147
  const serviceFirstTimes = first_times ? first_times[serviceType] : null;
148
148
  if (!serviceFirstTimes)
149
149
  return 'Closed';
150
- const firstTimeDate = (0, date_fns_tz_1.utcToZonedTime)((0, date_fns_1.parseISO)(serviceFirstTimes.date), tz);
150
+ const firstTimeDate = (0, date_fns_tz_1.utcToZonedTime)(serviceFirstTimes.utc, tz);
151
151
  const canOrderToday = (0, date_fns_1.isToday)(firstTimeDate);
152
152
  if (canOrderToday)
153
153
  return 'Currently closed, order for later today';
@@ -1,7 +1,7 @@
1
1
  import { serviceTypeNamesMap } from './constants';
2
2
  import { fmtDate, formatDateStr, isoToDate, makeOrderTimes, makeReadableDateStrFromIso, makeWeekday, time24ToDate, timezoneMap } from './datetimes';
3
3
  import { capitalize } from './helpers';
4
- import { format, parseISO, isToday, isTomorrow } from 'date-fns';
4
+ import { format, isToday, isTomorrow } from 'date-fns';
5
5
  import { utcToZonedTime } from 'date-fns-tz';
6
6
  export const makeOrderAddress = (address) => {
7
7
  const { street, unit, city, state, postal_code } = address || {};
@@ -136,7 +136,7 @@ export const getRevenueCenterStatus = (revenueCenter, serviceType) => {
136
136
  const serviceFirstTimes = first_times ? first_times[serviceType] : null;
137
137
  if (!serviceFirstTimes)
138
138
  return 'Closed';
139
- const firstTimeDate = utcToZonedTime(parseISO(serviceFirstTimes.date), tz);
139
+ const firstTimeDate = utcToZonedTime(serviceFirstTimes.utc, tz);
140
140
  const canOrderToday = isToday(firstTimeDate);
141
141
  if (canOrderToday)
142
142
  return 'Currently closed, order for later today';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.4.58",
3
+ "version": "0.4.59",
4
4
  "description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",