Created
April 15, 2021 20:56
-
-
Save Reeska/8bd39da976d9252fbb7e5e8b6cf651ee to your computer and use it in GitHub Desktop.
Overwatch League Schedule in local datetime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const matches = data.content.tableData.events[0].matches | |
const mapMatch = (match) => { | |
const title = match.competitors.map(team => team.name).join('-') | |
return { | |
title: title, | |
start: new Date(match.startDate).toLocaleString(), | |
} | |
} | |
console.log(matches.map(mapMatch)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment