Dates                  package:base                  R Documentation

_D_a_t_e _C_l_a_s_s

_D_e_s_c_r_i_p_t_i_o_n:

     Description of the class '"Date"' representing calendar dates.

_U_s_a_g_e:

     ## S3 method for class 'Date':
     summary(object, digits = 12, ...)

_A_r_g_u_m_e_n_t_s:

  object: An object summarized.

  digits: Number of significant digits for the computations.

     ...: Further arguments to be passed from or to other methods.

_D_e_t_a_i_l_s:

     Dates are represented as the number of days since 1970-01-01, with
     negative values for earlier dates.  They are always printed
     following the rules of the current Gregorian calendar, even though
     that calendar was not in use long ago (it was adopted in 1752 in
     Great Britain and its colonies).

     It is intended that the date should be an integer, but this is not
     enforced in the internal representation.  Fractional days will be
     ignored when printing.  It is possible to produce fractional days
     via the 'mean' method or by adding or subtracting (see
     'Ops.Date').

_S_e_e _A_l_s_o:

     'Sys.Date' for the current date.

     'Ops.Date' for operators on '"Date"' objects.

     'format.Date' for conversion to and from character strings.

     'plot.Date' and 'hist.Date' for plotting.

     'weekdays' for convenience extraction functions.

     'seq.Date', 'cut.Date', 'round.Date' for utility operations.

     'DateTimeClasses' for date-time classes.

_E_x_a_m_p_l_e_s:

     (today <- Sys.Date())
     format(today, "%d %b %Y")  # with month as a word
     (tenweeks <- seq(today, len=10, by="1 week")) # next ten weeks
     weekdays(today)
     months(tenweeks)
     as.Date(.leap.seconds)

