=WEEKDAY returns a Day No. for a particular date, based on which day the date is falling on.

Example, =WEEKDAY (A1, 2), where A1 is a Monday, the output of the formula will be 1.
The parameter that you choose is extremely important. Please see below table.
 PARAMETER NUMBER RETURNED 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). 2 Numbers 1 (Monday) through 7 (Sunday). 3 Numbers 0 (Monday) through 6 (Sunday). 11 Numbers 1 (Monday) through 7 (Sunday). 12 Numbers 1 (Tuesday) through 7 (Monday). 13 Numbers 1 (Wednesday) through 7 (Tuesday). 14 Numbers 1 (Thursday) through 7 (Wednesday). 15 Numbers 1 (Friday) through 7 (Thursday). 16 Numbers 1 (Saturday) through 7 (Friday). 17 Numbers 1 (Sunday) through 7 (Saturday).

I usually use ,2 as it helps to me work on weekdays & weekends.
With ,2 all weekdays lie between 1 to 5 and all weekends are 6 to 7.

Please see below example of how you can actually apply this.

The date 15-02-2014 is a Saturday. I have found this out using the =TEXT formula.