I have two buttons for cycling through months (next, previous) and a paragraph next to it which displays the month as in "October 2018".
I'd like to append the date to URL on button click such as ?dateFrom=01-10-2018&dateTo=31-10-2018
How could I recognize what my next or previous month is and whether it has 30 or 31 days without hard coding every possible option?