nDay                package:fCalendar                R Documentation

_n-_t_h _n-_d_a_y _D_a_t_e_s

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

     Computes the date for the n-th or last ocurrance of a  n-day in
     year/month.

_U_s_a_g_e:

     timeNthNdayInMonth(charvec, nday = 1, nth = 1, format = "%Y-%m-%d", 
         zone = myFinCenter, FinCenter = myFinCenter)
         
     timeLastNdayInMonth(charvec, nday = 1, format = "%Y-%m-%d", 
         zone = myFinCenter, FinCenter = myFinCenter)

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

 charvec: a character vector of dates and times. 

    nday: an integer vector with entries ranging from  '0' (Sunday) to
          '6' (Saturday). 

     nth: an integer vector numbering the n-th occurence. 

  format: the format specification of the input character vector. 

    zone: the time zone or financial center where the data were
          recorded. 

FinCenter: a character with the the location of the   financial center
          named as "continent/city".  

_V_a_l_u_e:

     returns an object of class 'timeDate'.

     For function 'timeNthNdayInMonth' the 'nth' ocurrance  of a n-day
     (nth = 1,...,5) in 'year', 'month', and for {timeLastNdayInMonth}
     the last 'nday' in 'year', 'month' will be returned.

_E_x_a_m_p_l_e_s:

      
     ## timeNthNdayInMonth -
        # What date is the second Monday in April 2004 ?
        timeNthNdayInMonth("2004-04-01", 1, 2)
         
     ## timeLastNdayInMonth -
        # What date has the last Tuesday in May, 1996 ?
        timeLastNdayInMonth("1996-05-01", 2)

