diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-09-02 12:23:11 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-09-02 12:23:11 +0530 |
commit | 659e9cdbe6defd54d0f4713bb230e4a156262a2c (patch) | |
tree | 1a29245514f9dd5e84617c6ac699ef7a2bf264a5 /packages/taler-wallet-core/src/util/time.ts | |
parent | 0ffea74ad52113aa9036453ff3ea8d4dff61b3d8 (diff) | |
download | wallet-core-659e9cdbe6defd54d0f4713bb230e4a156262a2c.tar.gz wallet-core-659e9cdbe6defd54d0f4713bb230e4a156262a2c.tar.bz2 wallet-core-659e9cdbe6defd54d0f4713bb230e4a156262a2c.zip |
respect cache header
Diffstat (limited to 'packages/taler-wallet-core/src/util/time.ts')
-rw-r--r-- | packages/taler-wallet-core/src/util/time.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/util/time.ts b/packages/taler-wallet-core/src/util/time.ts index ccd75e14b..ff4c1885b 100644 --- a/packages/taler-wallet-core/src/util/time.ts +++ b/packages/taler-wallet-core/src/util/time.ts @@ -46,6 +46,10 @@ export function getTimestampNow(): Timestamp { }; } +export function isTimestampExpired(t: Timestamp) { + return timestampCmp(t, getTimestampNow()) <= 0; +} + export function getDurationRemaining( deadline: Timestamp, now = getTimestampNow(), |