File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { MediaType } from '../../utils/MediaType';
77
88export class MobyGamesAPI extends APIModel {
99 plugin : MediaDbPlugin ;
10+ apiDateFormat : string = 'YYYY-DD-MM' ;
1011
1112 constructor ( plugin : MediaDbPlugin ) {
1213 super ( ) ;
@@ -46,7 +47,7 @@ export class MobyGamesAPI extends APIModel {
4647 type : MediaType . Game ,
4748 title : result . title ,
4849 englishTitle : result . title ,
49- year : result . platforms [ 0 ] . first_release_date ?? '' ,
50+ year : new Date ( result . platforms [ 0 ] . first_release_date ) . getFullYear ( ) . toString ( ) ,
5051 dataSource : this . apiName ,
5152 id : result . game_id ,
5253
@@ -78,7 +79,7 @@ export class MobyGamesAPI extends APIModel {
7879 type : MediaType . Game ,
7980 title : result . title ,
8081 englishTitle : result . title ,
81- year : result . platforms [ 0 ] . first_release_date ,
82+ year : new Date ( result . platforms [ 0 ] . first_release_date ) . getFullYear ( ) . toString ( ) ,
8283 dataSource : this . apiName ,
8384 url : `https://www.mobygames.com/game/${ result . game_id } ` ,
8485 id : result . game_id ,
You can’t perform that action at this time.
0 commit comments