Do you calculate duration in the frontend? Or should you pass that in too?