In Powershell, assuming:
$rangeFrom = "2020-03-01"
$rangeTo = "2020-05-13"
How could I obtain:
$monthRange[0] = "2020-03-01","2020-03-31"
$monthRange[1] = "2020-04-01","2020-04-30"
$monthRange[2] = "2020-05-01","2020-05-13"
Dates will be used in a loop as strings (from/to) on commands that do not support more than one month in range, such as:
myCommand -From $rangeFrom -To $rangeTo # keep this in one month range