gistlib
main.mfunction [days, hours, mins, secs] = convert_seconds(seconds) t = secondsToDate(seconds); days = t.Day - 1; hours = t.Hour; mins = t.Minute; secs = t.Second; end function t = secondsToDate(seconds) t = datetime(seconds,'ConvertFrom','s'); end 268 chars12 lines
function [days, hours, mins, secs] = convert_seconds(seconds) t = secondsToDate(seconds); days = t.Day - 1; hours = t.Hour; mins = t.Minute; secs = t.Second; end function t = secondsToDate(seconds) t = datetime(seconds,'ConvertFrom','s'); end
gistlibby LogSnag