Made date/timestamps consistent and less shitty

This commit is contained in:
Schuyler Cebulskie
2016-09-27 19:46:53 -04:00
parent b6c26cc2ae
commit 1e57c968dd
10 changed files with 137 additions and 75 deletions

View File

@@ -92,23 +92,20 @@ class Invite {
*/
this.channel = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel);
this._createdAt = new Date(data.created_at).getTime();
/**
* The timestamp the invite was created at
* @type {number}
*/
this.createdTimestamp = new Date(data.created_at).getTime();
}
/**
* The creation date of the invite
* The time the invite was created
* @type {Date}
* @readonly
*/
get createdAt() {
return new Date(this._createdAt);
}
/**
* The creation date of the invite
* @type {Date}
*/
get creationDate() {
return new Date(this._createdAt);
return new Date(this.createdTimestamp);
}
/**