Home > classes > @time > get.m

get

PURPOSE ^

GET get time properties.

SYNOPSIS ^

function val = get(tt, prop_name)

DESCRIPTION ^

 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.m,v 1.10 2008/02/11 17:28:45 ingo Exp $

 HISTORY:     23-07-2007 Diepholz
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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.m,v 1.10 2008/02/11 17:28:45 ingo Exp $
0021 %
0022 % HISTORY:     23-07-2007 Diepholz
0023 %                 Creation
0024 %
0025 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0026 
0027 VERSION       = '$Id: get.m,v 1.10 2008/02/11 17:28:45 ingo 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);

Generated on Mon 31-Mar-2008 13:54:54 by m2html © 2003