You are on page 1of 4

Calculate the date of the nth occurence of a weekday: Year 2008 Basic formula: Month No.

(1-12) 3 Friday, March 21, 2008 Day No. (1-7) 6 With error handling: Nth Occurrence (1-5) 3 Friday, March 21, 2008 Calculate the last occurrence of a weekday: Year 2008 Month No. (1-12) 3 Friday, March 28, 2008 Day No. (1-7) 6

For testing and verification:

March, 2008 Sun 2 9 16 23 30 Mon 3 10 17 24 31

r testing and verification:

March, 2008 Tue Wed Thu 4 11 18 25 5 12 19 26 6 13 20 27

Fri 7 14 21 28

Sat 1 8 15 22 29

Which 1st 2nd 3rd 4th Last

Day Sunday Tuesday Friday Friday Friday

Month March February March April June

Year 2009 2009 2009 2009 2009

Calculated Date March 1, 2009 February 10, 2009 March 20, 2009 April 24, 2009 June 26, 2009

For testing and verificati

Mar Sun 1 8 15 22 29

Convert words to 1 numbers: 1


For testing and verification:
(not necessarry for the formula)

March, 2009 Mon 2 9 16 23 30 Tue 3 10 17 24 31 Wed 4 11 18 25 Thu 5 12 19 26 Fri 6 13 20 27 Sat 7 14 21 28

You might also like