added formatDuration.js

solution to “Human readable duration format”