You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: seconds2str.m
    path of file: ./repos/doa-tools/utils
    
    the code of the file until where you have to start completion: function s = seconds2str(t)
%SECONDS2STR Convert seconds to nicer looking string.
t = double(t);
if t < 1e-3
    s = sprintf('%3.2f ns', t*1e6);
elseif t < 1
    s = sprintf('%3.2f ms', t*1e3);
elseif t < 60
    s = sprintf('%2.2f s', t);
else

    
function s = seconds2str(t)
%SECONDS2STR Convert seconds to nicer looking string.
t = double(t);
if t < 1e-3
    s = sprintf('%3.2f ns', t*1e6);
elseif t < 1
    s = sprintf('%3.2f ms', t*1e3);
elseif t < 60
    s = sprintf('%2.2f s', t);
else
    if t > 31536000
        year = floor(t/31536000);
        t = mod(t, 31536000);
    else
        year = 0;
    end