From d2bb7a312c2cdc25418fd422389c06bd6d8cae2c Mon Sep 17 00:00:00 2001 From: Douglas Sebastian Date: Wed, 29 Nov 2023 09:53:19 -0300 Subject: [PATCH] change: creationDate as Date instead of string --- src/types/Profile.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/types/Profile.ts b/src/types/Profile.ts index ec8b5e7a..5103f3ed 100644 --- a/src/types/Profile.ts +++ b/src/types/Profile.ts @@ -62,6 +62,13 @@ export class ProfileClass implements Profile { return import.meta.env.VITE_UNIVERSIME_API + "/profile/image/" + this.id; } + /** + * Created date as `Date` instead of string; + */ + get createdAt() { + return new Date(this.creationDate); + } + /** * Separates a full name into a first name and a last name. *