I parse dates I get from an API with Moment, and I need to sort the array when I\'m done collecting the data. I currently have this:
myobject.name = name;
my
Based on the link to the momentjs docs in the warning, browsers may be unreliable or inconsistent in parsing the format you're providing "DD/MM/YYYY". If you need to keep this format, one solution would be to provide the format when converting the string back to a moment object when calculating the diff. So you could do
return moment.utc(left.timeStamp, 'DD/MM/YYYY').diff(moment.utc(right.timeStamp, 'DD/MM/YYYY'))