summary refs log tree commit diff
path: root/timestamp.ts
diff options
context:
space:
mode:
Diffstat (limited to 'timestamp.ts')
-rw-r--r--timestamp.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/timestamp.ts b/timestamp.ts
new file mode 100644
index 0000000..cfa9a05
--- /dev/null
+++ b/timestamp.ts
@@ -0,0 +1,10 @@
+export default class Timespamp {
+    js: number;
+    unix: number;
+    str: string;
+    constructor (date: Date) {
+        this.js = Number(date)
+        this.unix = Math.floor(date.getTime() / 1000)
+        this.str = String(date)
+    }
+}
\ No newline at end of file