feat: Add delay until action for delay app

This commit is contained in:
Faruk AYDIN
2022-12-16 03:15:30 +03:00
committed by Ali BARIN
parent 5d9ed13003
commit cb58ab5fb7
6 changed files with 81 additions and 26 deletions

View File

@@ -0,0 +1,8 @@
const delayUntilAsMilliseconds = (delayUntil: string) => {
const delayUntilDate = new Date(delayUntil);
const now = new Date();
return delayUntilDate.getTime() - now.getTime();
};
export default delayUntilAsMilliseconds;