After converting a date to a number with the following code:
Date.parse(doc.createdAt);
I receive this result:
1576699528000
It seems like the number becomes a string when passed from the server to the front end and back to the server. How can I convert it back to a date object?