GET get time properties. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: GET get time properties. CALL: value = get(tt, 'property'); EXAMPLES: name = get(tt, 'name'); utc_epoch_milli = get(tt, 'utc_epoch_milli'); timezone = get(tt, 'timezone'); timezone_IDs = get(tt, 'timezone_IDs'); timezone_IDs = get(tt, 'IDs'); timeformat = get(tt, 'timeformat'); time_str = get(tt, 'time_str'); created = get(tt, 'created'); version = get(tt, 'version'); VERSION: $Id: get.html,v 1.12 2008/03/31 10:27:40 hewitson Exp $ HISTORY: 23-07-2007 Diepholz Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function val = get(tt, prop_name) 0002 % GET get time properties. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: GET get time properties. 0007 % 0008 % CALL: value = get(tt, 'property'); 0009 % 0010 % EXAMPLES: name = get(tt, 'name'); 0011 % utc_epoch_milli = get(tt, 'utc_epoch_milli'); 0012 % timezone = get(tt, 'timezone'); 0013 % timezone_IDs = get(tt, 'timezone_IDs'); 0014 % timezone_IDs = get(tt, 'IDs'); 0015 % timeformat = get(tt, 'timeformat'); 0016 % time_str = get(tt, 'time_str'); 0017 % created = get(tt, 'created'); 0018 % version = get(tt, 'version'); 0019 % 0020 % VERSION: $Id: get.html,v 1.12 2008/03/31 10:27:40 hewitson Exp $ 0021 % 0022 % HISTORY: 23-07-2007 Diepholz 0023 % Creation 0024 % 0025 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0026 0027 VERSION = '$Id: get.html,v 1.12 2008/03/31 10:27:40 hewitson Exp $'; 0028 CATEGORY = 'Helper'; 0029 DEFAULT_PLIST = plist('property', ''); 0030 0031 %%% If prop_name is a plist then extrat the poperty name from the plist. 0032 if isa(prop_name, 'plist') 0033 prop_name = find(prop_name, 'property'); 0034 if isempty(prop_name) 0035 error ('### The plist does not contain the ''key'' = ''property'''); 0036 end 0037 end 0038 0039 if strcmpi(prop_name, 'timezone_IDs') || strcmpi(prop_name, 'IDs') || ... 0040 strcmpi(prop_name, 'timezoneIDs') || strcmpi(prop_name, 'ID') 0041 val = char(java.util.TimeZone.getAvailableIDs); 0042 return 0043 end 0044 0045 val = generic_get(tt, prop_name, DEFAULT_PLIST, VERSION, CATEGORY);