const months = [
	"January",
	"February",
	"March",
	"April",
	"May",
	"June",
	"July",
	"August",
	"September",
	"October",
	"November",
	"December",
]

const days = [
	"Monday",
	"Tuesday",
	"Wednesday",
	"Thursday",
	"Friday",
	"Saturday",
	"Sunday",
]

const convertDate = (isoStamp: string) => {
	//const unixSeconds = new Date(isoStamp)
	////	const weekday = days[unixSeconds.getDay()]
	//const day = unixSeconds.getDate()
	//const month = months[unixSeconds.getMonth()]
	//const year = unixSeconds.getFullYear()
	//return `${day} ${month} ${year}`

	console.log(isoStamp)
	const date = new Date(isoStamp)
	const year = date.getFullYear()
	const month = String(date.getMonth() + 1).padStart(2, "0")
	const day = String(date.getDate()).padStart(2, "0")
	return `${year}-${month}-${day}`
}

export { convertDate }
