I am trying to create a function with datapikcer information but I can not find a way to do it. Given a date, for example: (01-09-2017), know what is Monday of this week? In this case I would have to return (08-28-2017). (That would be a special case because Monday of this week corresponds to the previous month). But a normal case would be for example if I happen to the function (06-09-2017), I would have to return (04-09-2017) which is the same month and is the Monday corresponding to that week and that date.