From Assignment Overview:
"In this assignment, you'll create a train schedule application that incorporates Firebase to host arrival and departure data. Your app will retrieve and manipulate this information with Moment.js. This website will provide up-to-date information about various trains, namely their arrival times and how many minutes remain until they arrive at their station."
The calculation part took a lot of googling. Credit to previous "train scheduler" github projects, in particular "https://github.com/ThompsonJonM/train-scheduler/blob/master/assets/javascript/logic.js"