Hi, I’m making a Angular weather app using the Accuweather API, I’m able to fetch and display the data as needed but the date is not in the correct format e.g
2022-09-11T07:00:00+02:00 instead of 11 September 2022. i would like to make the necessary formatting to make it more readable. The data fetched is stored in a array. the dates are in a array within the object.
{
"Headline": {
"EffectiveDate": "2022-09-11T19:00:00+02:00",
"EffectiveEpochDate": 1662915600,
"Severity": 3,
"Text": "Expect showers Sunday evening",
"Category": "rain",
"EndDate": "2022-09-12T01:00:00+02:00",
"EndEpochDate": 1662937200,
"MobileLink": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?lang=en-us",
"Link": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?lang=en-us"
},
"DailyForecasts": [
{
"Date": "2022-09-11T07:00:00+02:00",
"EpochDate": 1662872400,
"Temperature": {
"Minimum": {
"Value": 62,
"Unit": "F",
"UnitType": 18
},
"Maximum": {
"Value": 75,
"Unit": "F",
"UnitType": 18
}
},
"Day": {
"Icon": 13,
"IconPhrase": "Mostly cloudy w/ showers",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Light"
},
"Night": {
"Icon": 12,
"IconPhrase": "Showers",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Moderate"
},
"Sources": [
"AccuWeather"
],
"MobileLink": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=1&lang=en-us",
"Link": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=1&lang=en-us"
},
{
"Date": "2022-09-12T07:00:00+02:00",
"EpochDate": 1662958800,
"Temperature": {
"Minimum": {
"Value": 57,
"Unit": "F",
"UnitType": 18
},
"Maximum": {
"Value": 65,
"Unit": "F",
"UnitType": 18
}
},
"Day": {
"Icon": 18,
"IconPhrase": "Rain",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Light"
},
"Night": {
"Icon": 40,
"IconPhrase": "Mostly cloudy w/ showers",
"HasPrecipitation": true,
"PrecipitationType": "Rain",
"PrecipitationIntensity": "Light"
},
"Sources": [
"AccuWeather"
],
"MobileLink": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=2&lang=en-us",
"Link": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=2&lang=en-us"
},
{
"Date": "2022-09-13T07:00:00+02:00",
"EpochDate": 1663045200,
"Temperature": {
"Minimum": {
"Value": 61,
"Unit": "F",
"UnitType": 18
},
"Maximum": {
"Value": 68,
"Unit": "F",
"UnitType": 18
}
},
"Day": {
"Icon": 6,
"IconPhrase": "Mostly cloudy",
"HasPrecipitation": false
},
"Night": {
"Icon": 7,
"IconPhrase": "Cloudy",
"HasPrecipitation": false
},
"Sources": [
"AccuWeather"
],
"MobileLink": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=3&lang=en-us",
"Link": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=3&lang=en-us"
},
{
"Date": "2022-09-14T07:00:00+02:00",
"EpochDate": 1663131600,
"Temperature": {
"Minimum": {
"Value": 62,
"Unit": "F",
"UnitType": 18
},
"Maximum": {
"Value": 73,
"Unit": "F",
"UnitType": 18
}
},
"Day": {
"Icon": 2,
"IconPhrase": "Mostly sunny",
"HasPrecipitation": false
},
"Night": {
"Icon": 33,
"IconPhrase": "Clear",
"HasPrecipitation": false
},
"Sources": [
"AccuWeather"
],
"MobileLink": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=4&lang=en-us",
"Link": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=4&lang=en-us"
},
{
"Date": "2022-09-15T07:00:00+02:00",
"EpochDate": 1663218000,
"Temperature": {
"Minimum": {
"Value": 65,
"Unit": "F",
"UnitType": 18
},
"Maximum": {
"Value": 85,
"Unit": "F",
"UnitType": 18
}
},
"Day": {
"Icon": 1,
"IconPhrase": "Sunny",
"HasPrecipitation": false
},
"Night": {
"Icon": 34,
"IconPhrase": "Mostly clear",
"HasPrecipitation": false
},
"Sources": [
"AccuWeather"
],
"MobileLink": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=5&lang=en-us",
"Link": "http://www.accuweather.com/en/za/durban/305605/daily-weather-forecast/305605?day=5&lang=en-us"
}
]
}