I am getting data from and api and directly mapping the array from the api to the render. The time from the api if in the following format 2024-05-15T01:00:00-04:00 is there a way to format the data in the jsx of the react render or do I have to process the array before I render it?
example:
return (
<>
<div>{location} Hourly Forecast</div>
{weather.properties.periods.map((index) => {
return (
<div key={index.number}>
{index.startTime}
<div>
{index.shortForecast}
</div>
</div>
)
})}
I would like to format the time in the index.starttime but not sure it is possible I have searched but cant find anyone that has done this.