home *** CD-ROM | disk | FTP | other *** search
-
- _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,
- _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.
-
- mdy.date(month, day, year, nineteen=T, fillday=F, fillmonth=F)
-
- _A_r_g_u_m_e_n_t_s:
-
- month:
- vector of months.
-
- day:
- vector of days.
-
- year:
- vector of years.
-
- nineteen:
- if true, year values between 0 and 99 are assumed to be
- 1900+year; if false they are assumed to be in the first
- century A.D.
-
- fillday:
- if true, then missing days are replaced with 15.
-
- fillmonth:
- if true, then a missing month causes the month and day
- to be set to 7/1.
-
- Value:
-
- a vector of Julian dates.
-
- Note:
-
- The date functions are particularly useful in computing
- time spans, such as number of days on test, and similar
- functions can be found in other statistical packages.
- The baseline date of 1/1/60 is, of course, completely
- arbitrary (it is the same one used by SAS). The fill-
- day and fillmonth options are perhaps useful only to
- the author and a very few others: we sometimes deal
- with patients whose birth date was in the 1800's, and
- only the month or even only the year is known. When
- the interval is >80 years, a filler seems defensible.
-
- References:
-
- Numerical Recipies
-
- char.date, date.mmddyy, date.ddmmmyy, date.mmddyyyy
-
- _E_x_a_m_p_l_e_s:
-
- mdy.date(3,10,53)
-
-