@open-tender/utils 0.5.14 → 0.5.15

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.
@@ -224,10 +224,10 @@ const makeReadableDateStrFromIso = (iso, tz, verbose = false, withTime = true) =
224
224
  return verbose ? `Today @ ${timeString}` : timeString;
225
225
  }
226
226
  else if (dateString === (0, exports.tomorrowDate)()) {
227
- return `${verbose ? 'Tomorrow' : 'Tmrw'} ${withTime && `@ ${timeString}`}`;
227
+ return `${verbose ? 'Tomorrow' : 'Tmrw'} ${withTime ? `@ ${timeString}` : ''}`;
228
228
  }
229
229
  else {
230
- return `${verbose ? (0, date_fns_tz_1.format)(date, 'EEE, MMM d') : (0, date_fns_tz_1.format)(date, 'M/d')} ${withTime && `@ ${timeString}`}`;
230
+ return `${verbose ? (0, date_fns_tz_1.format)(date, 'EEE, MMM d') : (0, date_fns_tz_1.format)(date, 'M/d')} ${withTime ? `@ ${timeString}` : ''}`;
231
231
  }
232
232
  };
233
233
  exports.makeReadableDateStrFromIso = makeReadableDateStrFromIso;
@@ -88,7 +88,7 @@ const makeSuspendUnitlMsg = (suspendedUntil, tz, soldOutMessage, withTime = true
88
88
  const soldOutDynamicMsg = soldOutMessage === null || soldOutMessage === void 0 ? void 0 : soldOutMessage.replace('{{suspended_until}}', suspendedUntilDate
89
89
  ? (0, datetimes_1.makeReadableDateStrFromIso)(suspendedUntilDate.toISOString(), tz, false, withTime)
90
90
  : '');
91
- const soldOutMsg = soldOutDynamicMsg || 'Sold out for day';
91
+ const soldOutMsg = soldOutDynamicMsg || 'Sold out';
92
92
  return soldOutMsg;
93
93
  };
94
94
  exports.makeSuspendUnitlMsg = makeSuspendUnitlMsg;
@@ -185,10 +185,10 @@ export const makeReadableDateStrFromIso = (iso, tz, verbose = false, withTime =
185
185
  return verbose ? `Today @ ${timeString}` : timeString;
186
186
  }
187
187
  else if (dateString === tomorrowDate()) {
188
- return `${verbose ? 'Tomorrow' : 'Tmrw'} ${withTime && `@ ${timeString}`}`;
188
+ return `${verbose ? 'Tomorrow' : 'Tmrw'} ${withTime ? `@ ${timeString}` : ''}`;
189
189
  }
190
190
  else {
191
- return `${verbose ? format(date, 'EEE, MMM d') : format(date, 'M/d')} ${withTime && `@ ${timeString}`}`;
191
+ return `${verbose ? format(date, 'EEE, MMM d') : format(date, 'M/d')} ${withTime ? `@ ${timeString}` : ''}`;
192
192
  }
193
193
  };
194
194
  export const makeRequestedIso = (requestedAt) => {
@@ -80,6 +80,6 @@ export const makeSuspendUnitlMsg = (suspendedUntil, tz, soldOutMessage, withTime
80
80
  const soldOutDynamicMsg = soldOutMessage === null || soldOutMessage === void 0 ? void 0 : soldOutMessage.replace('{{suspended_until}}', suspendedUntilDate
81
81
  ? makeReadableDateStrFromIso(suspendedUntilDate.toISOString(), tz, false, withTime)
82
82
  : '');
83
- const soldOutMsg = soldOutDynamicMsg || 'Sold out for day';
83
+ const soldOutMsg = soldOutDynamicMsg || 'Sold out';
84
84
  return soldOutMsg;
85
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.5.14",
3
+ "version": "0.5.15",
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",