This is a static copy of a profile reportHome
timefun/private/dateformverify (121 calls, 0.131 sec)
Generated 05-Aug-2011 13:01:28 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/timefun/private/dateformverify.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
32 | S = char(formatdate([y,mo,d,h,... | 121 | 0.131 s | 100.0% |  |
23 | [y,mo,d,h,minute,s] = datevecm... | 121 | 0 s | 0% |  |
21 | try | 121 | 0 s | 0% |  |
15 | if ~isfinite(dtnumber) | 121 | 0 s | 0% |  |
10 | if isempty(dtnumber) | 121 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.131 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
timefun/private/formatdate | function | 121 | 0.120 s | 91.7% |  |
Self time (built-ins, overhead, etc.) | | | 0.011 s | 8.3% |  |
Totals | | | 0.131 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 32 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 15 |
Code lines that did run | 5 |
Code lines that did not run | 10 |
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-2008 The MathWorks, Inc.
7
8 %This is an internal function only.
9
121 10 if isempty(dtnumber)
11 S = reshape('', 0, length(dateformstr));
12 return;
13 end
14
121 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
121 21 try
22 % Obtain components using mex file
121 23 [y,mo,d,h,minute,s] = datevecmx(dtnumber,true); mo(mo==0) = 1;
24 catch exception
25 newExc = MException('MATLAB:datestr:ConvertDateNumber',...
26 'DATESTR failed converting date number to date vector.');
27 newExc = newExc.addCause(exception);
28 throw(newExc);
29 end
30
31 % format date according to data format template
0.13 121 32 S = char(formatdate([y,mo,d,h,minute,s],dateformstr,islocal));