home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / date / mdy.date < prev    next >
Encoding:
Text File  |  1997-09-13  |  1.6 KB  |  57 lines

  1.     
  2.     _C_o_n_v_e_r_t _t_o _J_u_l_i_a_n _d_a_t_e_s. _G_i_v_e_n _a _m_o_n_t_h, _d_a_y, _a_n_d _y_e_a_r,
  3.     _r_e_t_u_r_n_s _t_h_e _n_u_m_b_e_r _o_f _d_a_y_s _s_i_n_c_e _J_a_n_u_a_r_y _1, _1_9_6_0.
  4.     
  5.          mdy.date(month, day, year, nineteen=T, fillday=F, fillmonth=F)
  6.     
  7.     _A_r_g_u_m_e_n_t_s:
  8.     
  9.             month:
  10.          vector of months.
  11.     
  12.               day:
  13.          vector of days.
  14.     
  15.              year:
  16.          vector of years.
  17.     
  18.          nineteen:
  19.          if true, year values between 0 and 99 are assumed to be
  20.          1900+year; if false they are assumed to be in the first
  21.          century A.D.
  22.     
  23.           fillday:
  24.          if true, then missing days are replaced with 15.
  25.     
  26.         fillmonth:
  27.          if true, then a missing month causes the month and day
  28.          to be set to 7/1.
  29.     
  30.          Value:
  31.     
  32.          a vector of Julian dates.
  33.     
  34.          Note:
  35.     
  36.          The date functions are particularly useful in computing
  37.          time spans, such as number of days on test, and similar
  38.          functions can be found in other statistical packages.
  39.          The baseline date of 1/1/60 is, of course, completely
  40.          arbitrary (it is the same one used by SAS).  The fill-
  41.          day and fillmonth options are perhaps useful only to
  42.          the author and a very few others: we sometimes deal
  43.          with patients whose birth date was in the 1800's, and
  44.          only the month or even only the year is known.  When
  45.          the interval is >80 years, a filler seems defensible.
  46.     
  47.          References:
  48.     
  49.          Numerical Recipies
  50.     
  51.          char.date, date.mmddyy, date.ddmmmyy, date.mmddyyyy
  52.     
  53.     _E_x_a_m_p_l_e_s:
  54.     
  55.          mdy.date(3,10,53)
  56.     
  57.