I think that does what you need, but I'm not super familiar with it. It's basically finding the first day of the month, then finding the first day of the week with that day in it if I'm reading it right. It would be much easier if TA had code blocks like stack exchange...