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, length.out=10, by="1 week")) # next ten weeks
     weekdays(today)
     months(tenweeks)
     as.Date(.leap.seconds)

