So how does the day of the month help you determine if a date is a specific day of the week? Also, the arguments to your sameWeekday function are just strings and not dates, so you can not use the getDate method on strings.
You will need write your own code. I would suggest converting the strings into dates using the applicable JavaScript method. Then I would use the date method that gets the day of the week of a date for each date. Finally, I would return the comparison of those days of week.