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: ncdatelim.m
    path of file: ./repos/CDT/cdt
    
    the code of the file until where you have to start completion: function dt = ncdatelim(files, var)
%NCDATELIM Read first and last date from a netcdf file
%
%  tlim = ncdatelim(files, var) 
%
% Input variables:
%
%   files:  string/char array or cell array of strings, file name(s)
%
%   var:    string, name of time variable
%
% Output variables:
%
%   tlim:   n x 2 datetime array, where n is number of files

    
function dt = ncdatelim(files, var)
%NCDATELIM Read first and last date from a netcdf file
%
%  tlim = ncdatelim(files, var) 
%
% Input variables:
%
%   files:  string/char array or cell array of strings, file name(s)
%
%   var:    string, name of time variable
%
% Output variables:
%
%   tlim:   n x 2 datetime array, where n is number of files

% Copyright 2018 Kelly Kearney

if ischar(files)
    files = {files};
end