Premium problem65. Roll to the Nearest Business Day

Medium Locked

Given an array of dates, return each shifted 10 business days earlier. If a date itself falls on a weekend, first roll it backward to the nearest preceding business day before counting the 10 business days back.

Input

array(['2019-02-20', '2019-06-20', '2090-03-23'], dtype='datetime64[D]')

Output

array(['2019-02-06', '2019-06-06', '2090-03-09'], dtype='datetime64[D]')

Premium problem

This one's part of Premium. Unlock the full Pandas track plus every other premium problem on the site.

Implement solve(...)