You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that during the 07 - accessing - data section that the date-fns library is not formatting the JSON data correctly for originDate due to the fact that a string is being passed in as a string rather than a Date Object. When that happens, the date shows up as "Invalid Date" in the module as you implement new code regarding accessing data APIs.
I was able to fix it by doing this in data.js (line 12)
h.originDate = format((new Date(h.originDate).getFullYear(), new Date(h.originDate).getMonth(), new Date(h.originDate).getDay()), inputDateFormat);
The text was updated successfully, but these errors were encountered:
Hello,
I noticed that during the 07 - accessing - data section that the date-fns library is not formatting the JSON data correctly for originDate due to the fact that a string is being passed in as a string rather than a Date Object. When that happens, the date shows up as "Invalid Date" in the module as you implement new code regarding accessing data APIs.
I was able to fix it by doing this in data.js (line 12)
h.originDate = format((new Date(h.originDate).getFullYear(), new Date(h.originDate).getMonth(), new Date(h.originDate).getDay()), inputDateFormat);
The text was updated successfully, but these errors were encountered: