I need to recreate the following TSQL functionality in .Net, however I cant fugure out what it is doing within the nested parts.

I know that when run today it defaults to the 27th.

Code:
=DateAdd("d",28, DateAdd("d", -6,DateAdd("d", 1-Weekday(today),Today)))