timeDateMathOps          package:fCalendar          R Documentation

_t_i_m_e_D_a_t_e _M_a_t_h_e_m_a_t_i_c_a_l _O_p_e_r_a_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Functions for mathematical and logical operations on 'timeDate'
     objects. 

     The functions are:

       'Ops.timeDate'  Group 'Ops' generic functions for 'timeDate' objects,
       '+.timeDate'    Performs arithmetic + operation on 'timeDate' objects,
       '-.timeDate'    Performs arithmetic - operation on 'timeDate' objects.

_U_s_a_g_e:

     ## S3 method for class 'timeDate':
     Ops(e1, e2)

     ## S3 method for class 'timeDate':
     e1 + e2

     ## S3 method for class 'timeDate':
     e1 - e2    

_A_r_g_u_m_e_n_t_s:

  e1, e2: usually objects of class 'timeDate', in the case of addition
          and subtraction 'e2' may be of class 'numeric'. 

_V_a_l_u_e:

     'Ops.timeDate' 
      these are functions for mathematical operations. Group code{Ops}
     are  generic functions which manage mathematical operations. 

     '+.timeDate'
      '-.timeDate' 
      The plus operator '"+"' performs arithmetic "+" operation on 
     'timeDate' objects, and the minus operator '"-"' returns a 
     'difftime' object if both arguments 'e1' and 'e2'  are
     '"timeDate"' objects, or returns a '"timeDate"' object  'e2'
     seconds earlier than 'e1'.

_E_x_a_m_p_l_e_s:

     ## Create Character Vectors:
        dts = c("1989-09-28", "2001-01-15", "2004-08-30", "1990-02-09")
        dts
        tms = c(  "23:12:55",   "10:34:02",   "08:30:00",   "11:18:23")
        tms
        
     ## "+/-" - 
        # Add One Day to a Given timeDate Object:
        GMT = timeDate(dts, zone = "GMT", FinCenter = "GMT")
        GMT
        ZUR = timeDate(dts, zone = "GMT", FinCenter = "Europe/Zurich")
        ZUR
        GMT + 24*3600
        ZUR[2] - ZUR[1] 

