function y = year(t, varargin)
%YEAR Year numbers of datetimes.
%   
%   Y = YEAR(T)
%   Y = YEAR(T,KIND)
%   
%   See also YEAR.
%   


%   Copyright 2016-2022 The MathWorks, Inc.

if isstring(t) || ischar(t)
    error(message("parallel:distributed:DatetimefunInvalidArgumentType"));
else
    y = codistributed.pElementwiseUnaryOp(@year, t, varargin{:});
end
end
