added timestampBefore/After

This commit is contained in:
2023-01-25 18:15:04 +10:00
parent e4f7c06dd0
commit 9a7061393c

View File

@@ -411,6 +411,26 @@ export const timestampNowUtc = () => {
return "";
};
export const timestampBeforeNow = (timestamp) => {
try {
return new Date(timestamp) < new Date();
} catch (error) {
/* empty */
}
return false;
};
export const timestampAfterNow = (timestamp) => {
try {
return new Date(timestamp) > new Date();
} catch (error) {
/* empty */
}
return false;
};
export {
transitionEndEventName,
waitForElementRender,