

is.date(date)                                R Documentation

_D_a_t_e _O_b_j_e_c_t_s

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

     Tests for objects of class `"date"'.

_U_s_a_g_e_:

     is.date(x)
     as.date(x)

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

       x: any R object.

_V_a_l_u_e_:

     `is.date' returns `TRUE' if `x' has mode `"date"', and
     `FALSE' otherwise.

     Its behavor is unaffected by any attributes of `x'; for
     example, `x' could be a date array (in contrast to the
     behavior of `is.vector').

     `as.date' returns `x' if `x' is a simple object of
     class `"date"', and otherwise a date vector of the same
     length as `x' and with data resulting from coercing the
     elements of `x' to class `"date"'.  See the manual page
     for `as.date()' for details.

     Dates are stored as the number of days since 1/1/1960,
     and are kept in integer format.  (This is the same
     baseline value as is used by SAS).  The numerical meth-
     ods for dates treat `date - date' as a numeric, and
     `date +- numeric' as a date.

     Logical operations as well as the numeric functions
     `exp()', `log()', and so on are invalid.

     Other methods exist for missing value, `as.charac-
     ter()', printing, and summarizing.

_S_e_e _A_l_s_o_:

     `date.mdy', `mdy.date', `date.ddmmmyy', `as.date'.

