diff options
author | Matthew Miller <matthew@millerti.me> | 2022-01-29 13:12:04 -0800 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-01-29 13:12:04 -0800 |
commit | 3441a2d49a67b06fec56220b47a9ed538078ce45 (patch) | |
tree | e9b2987897ca9b61fce04eba925aec7ca4e40fd4 /packages/server/src/helpers/validateCertificateValidityWindow.ts | |
parent | 2348fb1b0a28f51c4d2e86deba506aa800d0cd90 (diff) |
Mock global.Date instead of refactoring
Diffstat (limited to 'packages/server/src/helpers/validateCertificateValidityWindow.ts')
-rw-r--r-- | packages/server/src/helpers/validateCertificateValidityWindow.ts | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/packages/server/src/helpers/validateCertificateValidityWindow.ts b/packages/server/src/helpers/validateCertificateValidityWindow.ts deleted file mode 100644 index e1a0926..0000000 --- a/packages/server/src/helpers/validateCertificateValidityWindow.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Make sure "now" is within a specific time frame - */ -export function validateCertificateValidityWindow(notBefore: Date, notAfter: Date): boolean { - const now = new Date(); - return notBefore < now && now < notAfter; -} |