API: Return Index from DatetimeIndex/PeriodIndex.strftime
- [x] closes #20127
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

I will update the docstring after #20103 is merged.