Syntax date.toSource() The toSource() method converts the Date object to a string that represents the source of the Date instance that was created.