toString() the Date object before calling .slice() (thanks @miltontony)