This is a static copy of a profile report

Home

timefun/private/dateformverify (9 calls, 0.060 sec)
Generated 14-Nov-2016 07:47:23 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/timefun/private/dateformverify.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
datestrfunction6
datevec>getformatsubfunction3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
32
S = char(formatdate([y,mo,d,h,...
90.060 s100.0%
23
[y,mo,d,h,minute,s] = datevecm...
90 s0%
21
try
90 s0%
15
if ~isfinite(dtnumber)
90 s0%
10
if isempty(dtnumber)
90 s0%
All other lines  0 s0%
Totals  0.060 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
timefun/private/formatdatefunction90.060 s100.0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.060 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)17
Code lines (lines that can run)15
Code lines that did run5
Code lines that did not run10
Coverage (did run/can run)33.33 %
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 

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

      9 
  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'));
  19 
end
  20 

      9 
  21 
try 
  22 
    % Obtain components using mex file
      9 
  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);
  29 
end
  30 

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