date(d, raw) {
        d = resolveFunc(d);
        if (isNull(d)) {
            throwIfRaw(raw);
            return 'null';
        }
        if (d instanceof Date) {
            return $to.date(d, raw);
        }
        throw new TypeError(`${wrapText(d)} is not a Date object.`);
    }
@method formatting.date
@description
Converts a `Date`-type value into PostgreSQL date/time presentation,
wrapped in quotes (unless flag `raw` is set).

@param {Date|function} d
Date object to be converted, or a function that returns one.

@param {boolean} [raw=false]
Indicates when not to escape the value.

@returns {string}