No purchase needed, a creative brain, will to learn, google, a nice forum (AWF) and persistance is all that is needed IMHO. Dont give up so easily, which IMHO is what you did (dont be offended).
You have a problem, work towards the solution in small steps, like I did.
1 - From any date go to the first of the month
2 - now find a way to go back to the first of a Q.
3 - Now reverse it and find the last
Your problem though may be in dates themselves, before you start 'working' with more complex dates like this, try and understand what is a date, what is an hour, minute, month, second etc... Once you have a better feel for that, you will be (much) better equiped to tackle any problem related to calculating any date.
Ex: Try and search how to calculate someone's age, the code is on here someplace and see if you can understand it in detail.
FYI: I am 100% full self tought.