diff options
author | WlodekM <[email protected]> | 2024-11-26 10:41:27 +0200 |
---|---|---|
committer | WlodekM <[email protected]> | 2024-11-26 10:41:27 +0200 |
commit | 4aa21cab5cf58d2899292ba49f718b5708a64e6a (patch) | |
tree | d064d8562282a3e94073dd783537ea8ad22dc033 /timestamp.ts | |
parent | ae159f6d6cb2d5ab933730a3c07903452df8c1ef (diff) |
eugh i spent 2 hours on this
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 |