diff options
Diffstat (limited to 'timestamp.ts')
-rw-r--r-- | timestamp.ts | 10 |
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 |