Ultra-basic idea...
Pick a year, then
do some math to find
a day-of-the-week.

That's our "Doomsday".

Each month of that
year has a date we
can reference as the
same day-of-the-week
as that "Doomsday".
The base "century part" of 2014 is 2000
The "year part" of 2014 is 14

The base-doomsday for century 2000 is 2 (from Table X)

Now, complete this sum:
baseDoomsday+year+round( year ÷ 4 )=
2+14+round( 14 ÷ 4 )=
2+14+round( 3.5 )=
2+14+3= 19

Now divide that total by 7 and get the remainder...
total÷7 =        
19÷7 = 2 with remainder 5
This remainder, 5, is the Doomsday for 2014. Day 5 is Friday (from Table Y).

So now we must see what date, in our month (Aug 2014), is a "Doomsday Friday".
The doomsdate in month 8 (Aug) is 8/8 (from Table Z).
And now we know that 8/8/2014 was a Friday!

And 8/15/2014 was also a Friday
And 8/22/2014 was also a Friday
So...
8/21/2014 was a Thursday
8/20/2014 was a Wednesday

TABLE X
base
centuries
base
doomsday
1500190023003
1600200024002
1700210025000
1800220026005
* You probably only need to
remember the red years!
TABLE Y
week dayday num
Sun0
Mon1
Tue2
Wed3
Thu4
Fri5
Sat6
TABLE Z
MonthDoomsdate
JanJan 31st (or Jan "32nd" in leap years)
FebFeb 28th (or Feb 29th in leap years)
MarMar "0th"
Other odd#
months
4/4, 6/6, 8/8,
10/10, and 12/12
Other even#
months
5/9, 7/11, 9/5, and 11/7
(Remember: "I work 9-to-5 at the 7-11")