These Days Work for Me Background

You're an attractive code golfer and quite a few people are asking you out.

You don't have time to think about which days exactly you're available, so you decide to create a function the accepts a date and returns the days of that week.

You then take those days of the week, insert it into your calendar program to see if anyone else has asked you out already.

Rules


Accepts a date in YYYY-MM-DD format
Returns an array/list of dates of that week. (Sunday is the first day)


The dates can be displayed as the milliseconds between January 1, 1970 and that date, in a "common" date format1, or date objects.

The order of the dates must be ascending.


(Although you're smart enough to include support for a descending list, the program is able to work quickest with an ascending list and who has a few milliseconds to spare?)

Must work with on any day since 1993. (Yes, you're 24 years old at the time of writing!)
Every Javascript answer gets a high five!


Specs

Sample Input: whichDates(2017-08-29)

Output: (the equivalent of)



console.log([
  Date.parse('2017-08-27'),
  Date.parse('2017-08-28'),
  Date.parse('2017-08-29'),
  Date.parse('2017-08-30'),
  Date.parse('2017-08-31'),
  Date.parse('2017-09-01'),
  Date.parse('2017-09-02'),
]);




1 A format that is fairly well known. Such as YYYY-MM-DD.

2 This is code-golf! Shortest code per language wins, but the shortest code overall gets the emerald checkmark!
Perl 6, 47 bytes



{my$d=Date.new($_);map($d+*-$d.day-of-week,^7)}


Try it online!

The code is almost self-explanatory. First we make up a Date object $d from the string, which happens to be in the nice ISOwhatever format. We can perform arithmetic with the dates (adding an integer = adding that many days, the same with subtracting). So $d-$d.day-of-week is the last this (oh my god, week has always started with Monday for me :D) week's Sunday. (.day-of-week is 1 for Monday to 7 for Sunday.) We then map over 0 to 6 (^7) and add that to the Sunday, getting all the days in the week. The number we're mapping over appears in the place of the star *. This list is then returned.