Merge pull request #27 from Milesq/master

fix(typo): acient -> ancient
This commit is contained in:
ryo-ma 2021-01-01 01:48:12 +09:00 • committed by GitHub
commit af12ef61f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -49,7 +49,7 @@ export class Card {
trophyList.push( trophyList.push(
new MultipleLangTrophy(userInfo.languageCount), new MultipleLangTrophy(userInfo.languageCount),
new LongTimeAccountTrophy(userInfo.durationYear), new LongTimeAccountTrophy(userInfo.durationYear),
new AncientAccountTrophy(userInfo.acientAccount), new AncientAccountTrophy(userInfo.ancientAccount),
new Joined2020Trophy(userInfo.joined2020), new Joined2020Trophy(userInfo.joined2020),
new AllSuperRankTrophy(isAllSRank), new AllSuperRankTrophy(isAllSRank),
); );

View file

@ -9,7 +9,7 @@ export class UserInfo {
public totalRepositories: number, public totalRepositories: number,
public languageCount: number, public languageCount: number,
public durationYear: number, public durationYear: number,
public acientAccount: number, public ancientAccount: number,
public joined2020: number, public joined2020: number,
) { ) {
} }
@ -92,7 +92,7 @@ export class GithubAPIClient {
const durationTime = new Date().getTime() - const durationTime = new Date().getTime() -
new Date(userData.createdAt).getTime(); new Date(userData.createdAt).getTime();
const durationYear = new Date(durationTime).getUTCFullYear() - 1970; const durationYear = new Date(durationTime).getUTCFullYear() - 1970;
const acientAccount = new Date(userData.createdAt).getFullYear() <= 2010 const ancientAccount = new Date(userData.createdAt).getFullYear() <= 2010
? 1 ? 1
: 0; : 0;
const joined2020 = new Date(userData.createdAt).getFullYear() == 2020 const joined2020 = new Date(userData.createdAt).getFullYear() == 2020
@ -107,7 +107,7 @@ export class GithubAPIClient {
userData.repositories.totalCount, userData.repositories.totalCount,
languages.size, languages.size,
durationYear, durationYear,
acientAccount, ancientAccount,
joined2020 joined2020
); );
return userInfo; return userInfo;