e2ed
Version:
E2E testing framework over Playwright
29 lines (28 loc) • 1.05 kB
JavaScript
;
/* eslint-disable @typescript-eslint/no-magic-numbers */
Object.defineProperty(exports, "__esModule", { value: true });
exports.DatesInterval = void 0;
/**
* Renders the interval between two dates.
* This base client function should not use scope variables (except other base functions).
* @internal
*/
const DatesInterval = ({ endTimeInMs, startTimeInMs }) => {
const startDate = new Date(startTimeInMs);
const endDate = new Date(endTimeInMs);
const startDateTime = startDate.toISOString();
const endDateTime = endDate.toISOString();
const date = startDateTime.slice(0, 10);
const startTime = startDateTime.slice(11, 19);
const endTime = endDateTime.slice(11, 19);
return (jsx.createElement(jsx.Fragment, null,
jsx.createElement("time", { dateTime: startDateTime },
date,
" ",
startTime),
' ',
"\u2013 ",
jsx.createElement("time", { dateTime: endDateTime }, endTime),
" UTC"));
};
exports.DatesInterval = DatesInterval;