mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-14 21:10:28 +08:00
Fix wrong date
https://github.com/DoctorMcKay/node-steamcommunity/issues/236
This commit is contained in:
parent
59bf4f1e92
commit
8225ea5127
@ -69,7 +69,13 @@ function CSteamUser(community, userData, customurl) {
|
||||
this.customURL = processItem('customURL', customurl);
|
||||
|
||||
if(this.visibilityState == 3) {
|
||||
this.memberSince = new Date(processItem('memberSince', '0').replace(/(\d{1,2})(st|nd|th)/, "$1"));
|
||||
let memberSinceValue = processItem('memberSince', '0').replace(/(\d{1,2})(st|nd|th)/, "$1");
|
||||
|
||||
if (memberSinceValue.indexOf(',') === -1) {
|
||||
memberSinceValue += ', ' + new Date().getFullYear();
|
||||
}
|
||||
|
||||
this.memberSince = new Date(memberSinceValue);
|
||||
this.location = processItem('location');
|
||||
this.realName = processItem('realname');
|
||||
this.summary = processItem('summary');
|
||||
|
Loading…
Reference in New Issue
Block a user