I'm looking for an easy way to get a week by day. So that, I have a function that get in input a day, and return all the accounts created in the week of that day.
So for example if I call the function with, as input the day 15th of January 2015, it get me all accounts created between 12-01-2015 and 18-01-2014 (considering I'm writing dd-mm-yyyy).
Any hints? Is there a declarative way to do it with SOQL similar to THIS_WEEK
or LAST_WEEK
?