Basically you can do it with 3 variables. Once you know the number of day in the week, you can easily discover the first and last day by using `addDays`.
These are the codes in the `Create variable` activities:
// Get number of day in week parseInteger(formatDateTime($myDateTime, 'u'), empty) // Get date for first day of week addDays($myDateTime, ($weekDay - 1) * -1) // Get date for last day of week addDays($firstWeekDayDate, 6)
Create a Javaction to get the Start day and last day of the week and return the respective output of the java action.
The below link will help to get the desired output
Hope this helps!!!