@tmlmobilidade/go-utils-dates 20260905.1222.34 → 20260905.1406.50
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.
- package/dist/dates.js +5 -4
- package/package.json +1 -1
package/dist/dates.js
CHANGED
|
@@ -370,9 +370,10 @@ export class Dates {
|
|
|
370
370
|
if (!isoDate)
|
|
371
371
|
throw new Error('ISO date is not set.');
|
|
372
372
|
const dateTime = DateTime.fromISO(isoDate, { setZone: true });
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
373
|
+
// Get the start and end of the standard window interval
|
|
374
|
+
const startMs = dateTime.minus({ hours: Dates.standardWindowHours }).startOf('hour').toMillis();
|
|
375
|
+
const endMs = dateTime.plus({ hours: Dates.standardWindowHours }).endOf('hour').toMillis();
|
|
376
|
+
// Return the start and end of the standard window interval
|
|
377
|
+
return { end: endMs, start: startMs };
|
|
377
378
|
}
|
|
378
379
|
}
|