I am computing an end date for the weekly publication of an advertisement. The inputs are the start date and the number of total insertions, while which Thursdays to insert the ad is based on a binary pattern like 00101 which would mean the third and fifth Thursday of the month - every week is...