CS130-W20 / team-A8

0 stars 0 forks source link

[BUG] - View Game Information - Timestamp is in UNIX #19

Closed jasche7 closed 4 years ago

jasche7 commented 4 years ago

Description

The first_release_date parameter is returned as a UNIX timestamp. In order to show the proper date, we'll have to process this string by doing something like:

var t = new Date( 1370001284000 ); var formatted = t.format("dd.mm.yyyy hh:MM:ss");

jasche7 commented 4 years ago

Fixed by adding the following function:

convertDate(timestamp){ var ts = new Date(timestamp).toDateString().split(' ').slice(1).join(' '); return ts; }

jasche7 commented 4 years ago

Final commit: b41fd30e4c0f9cc33fdd5d529a7ceaf5e43afa48