script

Get list of dates between start and end date

universalBeginner

About this Snippet

Get an array of all the dates between a start and end date. Must use YYYY-MM-DD format for inputs. If you feed it September 2, 2023 and September 28, 2023, the returned payload is the following:

\{
	"result": [
		"2023-09-03",
		"2023-09-04",
		"2023-09-05",
		"2023-09-06",
		"2023-09-07",
		"2023-09-08",
		"2023-09-09",
		"2023-09-10",
		"2023-09-11",
		"2023-09-12",
		"2023-09-13",
		"2023-09-14",
		"2023-09-15",
		"2023-09-16",
		"2023-09-17",
		"2023-09-18",
		"2023-09-19",
		"2023-09-20",
		"2023-09-21",
		"2023-09-22",
		"2023-09-23",
		"2023-09-24",
		"2023-09-25",
		"2023-09-26",
		"2023-09-27"
	],
	"console": []
\}

See it in action

CleanShot 2023-07-24 at 10.05.46@2x