import { formatTime } from "https://deno.land/x/pup@1.0.0-rc.8/plugins/web-interface/static/js/helpers.js";
Converts the given seconds into a string with a time unit. The units used are years, days, hours, minutes, and seconds.
Examples
// returns "1 year, 2 days"
formatTime(31539600);
// returns "1 year, 2 days" formatTime(31539600);
// returns "3 days, 2 hours"
formatTime(263000);
// returns "3 days, 2 hours" formatTime(263000);
// returns "3 hours, 50 minutes"
formatTime(13800);
// returns "3 hours, 50 minutes" formatTime(13800);