Karluk, you're happy man, because you work in default environment. In fact the result of aplying 'd' format mask depends on NLS_TERRITORY. In many countries the week starts from Monday. So a bit more complex but also more universal formula:
last_day(sysdate) - mod(7 + to_char(last_day(sysdate),'d')-<the day number you need in YOUR week>,7)
The less clear thing (7 + ) guarantees nonnegative result of mod() function.
If Wednesday is really the 4th day of the week the result is.
last_day(sysdate) - mod(7 + to_char(last_day(sysdate),'d')-4
For my country (as well as for many European countries) Wednesday is the third day so I need
last_day(sysdate) - mod(7 + to_char(last_day(sysdate),'d')-3
This formula need no offset table either.
The obvious consequence is getting the last day of the month the same as current (doesn't depend on nls):
last_day(sysdate) - mod(7 + to_char(last_day(sysdate),'d')-to_char(sysdate,'d')