


STRING writes a command string that can be used to recreate the input time object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: STRING writes a command string that can be used to recreate the
input time object.
CALL: cmd = string(pole);
VERSION: $Id: string.m,v 1.2 2008/01/15 17:36:36 ingo Exp $
HISTORY: 07-08-2007 Diepholz
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0001 function cmd = string(tt, varargin) 0002 % STRING writes a command string that can be used to recreate the input time object. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: STRING writes a command string that can be used to recreate the 0007 % input time object. 0008 % 0009 % CALL: cmd = string(pole); 0010 % 0011 % VERSION: $Id: string.m,v 1.2 2008/01/15 17:36:36 ingo Exp $ 0012 % 0013 % HISTORY: 07-08-2007 Diepholz 0014 % Creation 0015 % 0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0017 0018 VERSION = '$Id: string.m,v 1.2 2008/01/15 17:36:36 ingo Exp $'; 0019 0020 % Check if this is a call for parameters or for the cvs-version number 0021 if nargin == 2 0022 if isa(tt, 'time') && ischar(varargin{1}) 0023 in = char(varargin{1}); 0024 if strcmp(in, 'Params') 0025 cmd = plist(); 0026 return 0027 elseif strcmp(in, 'Version') 0028 cmd = VERSION; 0029 return 0030 end 0031 end 0032 end 0033 0034 cmd = '['; 0035 for jj=1:length(tt) 0036 0037 pl = plist(); 0038 pl = append(pl, 'timeformat', char(tt(jj).timeformat)); 0039 pl = append(pl, 'timezone', char(tt(jj).timezone.getID)); 0040 pl = append(pl, 'utc_epoch_milli', tt(jj).utc_epoch_milli); 0041 0042 cmd = [cmd ' time(' string(pl) ')']; 0043 0044 end 0045 cmd = [cmd ']']; 0046 0047 % END