difftimeDate            package:fCalendar            R Documentation

_D_i_f_f_e_r_e_n_c_e _o_f _t_w_o '_t_i_m_e_D_a_t_e' _O_b_j_e_c_t_s

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

     Returns a difference of two 'timeDate' objects.

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

     difftimeDate(time1, time2, 
         units = c("auto", "secs", "mins", "hours", "days", "weeks"))  

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

time1, time2: two objects objects of class 'timeDate'. 

   units: a character string denoting the date/time units in which the 
          results are desired. 

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

     The function, 'difftimeDate', takes a difference of two 
     'timeDate' objects and returns an object of class '"difftime"' 
     with an attribute indicating the units.

_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
        
     ## timeDate - 
        GMT = timeDate(dts, zone = "GMT", FinCenter = "GMT") 
        GMT

     ## diff - 
        # Suitably Lagged and Iterated Differences:
        difftimeDate(GMT[1:2], GMT[-(1:2)])  

