This is a static copy of a profile report

Home

timefun/private/dateformverify (Calls: 30, Time: 0.038 s)
Generated 16-Jul-2020 17:09:38 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/timefun/private/dateformverify.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
datestrfunction20
datevec>getformatsubfunction10
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
32
S = char(formatdate([y,mo,d,h,...
300.036 s93.2%
23
[y,mo,d,h,minute,s] = datevecm...
300.001 s3.7%
10
if isempty(dtnumber)
300.000 s0.0%
13
end
300.000 s0.0%
19
end
300.000 s0.0%
All other lines  0.001 s3.1%
Totals  0.038 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
timefun/private/formatdatefunction300.034 s89.6%
Self time (built-ins, overhead, etc.)  0.004 s10.4%
Totals  0.038 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function32
Non-code lines (comments, blank lines)16
Code lines (lines that can run)16
Code lines that did run8
Code lines that did not run8
Coverage (did run/can run)50.00 %
Function listing
time 
Calls 
 line
   1 
function S = dateformverify(dtnumber, dateformstr, islocal)
   2 
%Helper function for datevec, to determine if a format is right or not.
   3 
%This is a simplified copy of datestr.  Takes as input a date number, and a
   4 
%dateformat, and whether to localize or not.  
   5 

   6 
% Copyright 2003-2011 The MathWorks, Inc.
   7 

   8 
%This is an internal function only.
   9 

< 0.001 
     30 
  10
if isempty(dtnumber) 
  11 
   S = reshape('', 0, length(dateformstr)); 
  12 
   return;
< 0.001 
     30 
  13
end 
  14 

< 0.001 
     30 
  15
if ~isfinite(dtnumber) 
  16 
    %Don't bother to go through mex file, since datestr can not handle
  17 
    %non-finite dates.
  18 
    error(message('MATLAB:datestr:ConvertDateNumber'));
< 0.001 
     30 
  19
end 
  20 

< 0.001 
     30 
  21
try 
  22 
    % Obtain components using mex file
  0.001 
     30 
  23
    [y,mo,d,h,minute,s] = datevecmx(dtnumber,true);  mo(mo==0) = 1; 
  24 
catch exception 
  25 
    newExc = MException('MATLAB:datestr:ConvertDateNumber','%s',...
  26 
                        getString(message('MATLAB:datestr:ConvertDateNumberVerify')));
  27 
    newExc = newExc.addCause(exception);
  28 
    throw(newExc);
< 0.001 
     30 
  29
end 
  30 

  31 
% format date according to data format template
  0.036 
     30 
  32
S = char(formatdate([y,mo,d,h,minute,s],dateformstr,islocal));