August 2025
Intermediate to advanced
294 pages
6h 59m
English
As we suggested earlier, we don’t want to show a track duration as a number of seconds to users—and that’s any users, whether they’re reading the data on the artist’s profile page or editing track data via a form. Users should be able to enter durations of tracks as a string like “3:13”, and then Tunez should convert that to a number of seconds before saving it to the database.
We already have a lot of track data in the database stored in seconds, so the first step is to convert it to a minutes-and-seconds format for display.
We’ve seen calculations written inline with expressions, such as when we added a number calculation for tracks earlier. Like ...
Read now
Unlock full access