From b6739473a29324f1efd99d37e08e23bd51bf7ec2 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 30 Nov 2019 10:01:58 +0100 Subject: [PATCH] Create time() function --- src/utils/DateUtils.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/utils/DateUtils.ts diff --git a/src/utils/DateUtils.ts b/src/utils/DateUtils.ts new file mode 100644 index 0000000..a12e73b --- /dev/null +++ b/src/utils/DateUtils.ts @@ -0,0 +1,9 @@ +/** + * Date utilities + * + * @author Pierre HUBERT + */ + +export function time() : number { + return Math.floor((new Date()).getTime()/1000); +} \ No newline at end of file