function setAbsTime(h,timeArray)
%SETABSTIME  Set the absolute time vector in a time series object
%
%   setAbsTime(TS, TIMES) sets the absolute time vector in the time series 
%   object TS with the values in TIMES. TIMES must be either a cell array 
%   of strings, or a char array, containing valid date or time values all 
%   of the same format. See DATESTR for help on date string formats.
%
%   Note that this method is case sensitive.
%
%   Example:
% 
%   Create a time series object:
%   ts=tsdata.timeseries(rand(3))
%
%   Set the absolute time vector:
%   setAbsTime(ts,{'12-DEC-2047 12:34:56','12-DEC-2047 13:34:56','12-DEC-2047 14:34:56'})
%
%   See also TSDATA.TIMESERIES/GETABSTIME, TSDATA.TIMESERIES/TIMESERIES

%   Author(s): James G. Owen, Rong Chen
%   Copyright 1986-2004 The MathWorks, Inc.
%   $Revision: 1.1.6.1 $  $Date: 2005/01/18 16:06:46 $
 
if (iscell(timeArray) || ischar(timeArray))&& length(timeArray)>0
    [h.Time,h.TimeInfo.Startdate]=tsAnalyzeAbsTime(timeArray,h.TimeInfo.Units);
end
 
