GETTIMEZONES Get all possible timezones. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Get all possible timezones. CALL: zones = obj.getTimezones(); INPUTS: obj - can be a vector, matrix, list, or a mix of them. M-FILE INFO: Get information about this methods by calling >> time.getInfo('getTimezones') Get information about a specified set-plist by calling: >> time.getInfo('getTimezones', 'set') VERSION: $Id: getTimezones.m,v 1.2 2008/09/04 15:29:31 ingo Exp $ HISTORY: 27-05-2008 Diepholz Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % GETTIMEZONES Get all possible timezones. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: Get all possible timezones. 0005 % 0006 % CALL: zones = obj.getTimezones(); 0007 % 0008 % INPUTS: obj - can be a vector, matrix, list, or a mix of them. 0009 % 0010 % M-FILE INFO: Get information about this methods by calling 0011 % >> time.getInfo('getTimezones') 0012 % 0013 % Get information about a specified set-plist by calling: 0014 % >> time.getInfo('getTimezones', 'set') 0015 % 0016 % VERSION: $Id: getTimezones.m,v 1.2 2008/09/04 15:29:31 ingo Exp $ 0017 % 0018 % HISTORY: 27-05-2008 Diepholz 0019 % Creation 0020 % 0021 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0022 0023 function varargout = getTimezones(varargin) 0024 0025 %%% Check if this is a call for parameters 0026 if utils.helper.isinfocall(varargin{:}) 0027 varargout{1} = getInfo(varargin{3}); 0028 return 0029 end 0030 0031 varargout{1} = cell(java.util.TimeZone.getAvailableIDs); 0032 0033 end 0034 0035 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0036 % Local Functions % 0037 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0038 0039 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0040 % 0041 % FUNCTION: getInfo 0042 % 0043 % DESCRIPTION: Get Info Object 0044 % 0045 % HISTORY: 11-07-07 M Hewitson 0046 % Creation. 0047 % 0048 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0049 0050 function ii = getInfo(varargin) 0051 if nargin == 1 && strcmpi(varargin{1}, 'None') 0052 sets = {}; 0053 pl = []; 0054 else 0055 sets = {'Default'}; 0056 pl = getDefaultPlist; 0057 end 0058 % Build info object 0059 ii = minfo(mfilename, 'time', '', utils.const.categories.helper, '$Id: getTimezones.m,v 1.2 2008/09/04 15:29:31 ingo Exp $', sets, pl); 0060 end 0061 0062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0063 % 0064 % FUNCTION: getDefaultPlist 0065 % 0066 % DESCRIPTION: Get Default Plist 0067 % 0068 % HISTORY: 11-07-07 M Hewitson 0069 % Creation. 0070 % 0071 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0072 0073 function plo = getDefaultPlist() 0074 plo = plist(); 0075 end 0076