_applyDateFilter(query, options, dateColumn) {
        // Note: Timezone handling might require converting dates before querying,
        // depending on how created_at is stored (UTC assumed here).
        if (options.date_from) {
            try {
                // Attempt to parse and validate the date
                const fromDate = new Date(options.date_from);
                if (!isNaN(fromDate.getTime())) {
                    query.where(dateColumn, '>=', options.date_from);
                } else {
                    logging.warn(`Invalid date_from format: ${options.date_from}. Skipping filter.`);
                }
            } catch (e) {
                logging.warn(`Error parsing date_from: ${options.date_from}. Skipping filter.`);
            }
        }
        if (options.date_to) {
            try {
                const toDate = new Date(options.date_to);
                if (!isNaN(toDate.getTime())) {
                    // Include the whole day for the 'to' date
                    query.where(dateColumn, '<=', options.date_to + ' 23:59:59');
                } else {
                    logging.warn(`Invalid date_to format: ${options.date_to}. Skipping filter.`);
                }
            } catch (e) {
                logging.warn(`Error parsing date_to: ${options.date_to}. Skipping filter.`);
            }
        }
    }
Apply date filters to a query builder instance
@private
@param {import('knex').Knex.QueryBuilder} query
@param {StatsServiceOptions} options
@param {string} dateColumn - The date column to filter on