public static function AllUpdates(
        $className = DatedUpdatePage::class,
        $parentID = null,
        $tagID = null,
        $dateFrom = null,
        $dateTo = null,
        $year = null,
        $monthNumber = null
    ) {

        $items = $className::get();
        $dbTableName = DataObject::getSchema()->tableForField($className, 'Date');
        if (!$dbTableName) {
            $dbTableName = DatedUpdatePage::class;
        }

        // Filter by parent holder.
        if (isset($parentID)) {
            $items = $items->filter(['ParentID'=>$parentID]);
        }

        // Filter down to a single tag.
        if (isset($tagID)) {
            $taxonomy = DataObject::getSchema()->tableName(TaxonomyTerm::class);
            $tableName = DataObject::getSchema()->tableName($className);

            $items = $items->innerJoin(
                'BasePage_Terms',
                sprintf('"%s"."ID" = "BasePage_Terms"."BasePageID"', $tableName)
            )->innerJoin(
                $taxonomy,
                sprintf(
                    '"BasePage_Terms"."TaxonomyTermID" = "%s"."ID" AND "TaxonomyTerm"."ID" = \'%d\'',
                    $taxonomy,
                    $tagID
                )
            );
        }

        // Filter by date
        if (isset($dateFrom)) {
            if (!isset($dateTo)) {
                $dateTo = $dateFrom;
            }

            $items = $items->where([
                sprintf('"%s"."Date" >= \'%s\'', $dbTableName, Convert::raw2sql("$dateFrom 00:00:00")),
                sprintf('"%s"."Date" <= \'%s\'', $dbTableName, Convert::raw2sql("$dateTo 23:59:59"))
            ]);
        }

        // Filter down to single month.
        if (isset($year) && isset($monthNumber)) {
            $year = (int)$year;
            $monthNumber = (int)$monthNumber;

            $beginDate = sprintf("%04d-%02d-01 00:00:00", $year, $monthNumber);
            $endDate = date('Y-m-d H:i:s', strtotime("{$beginDate} +1 month"));

            $items = $items->where(array(
                sprintf('"%s"."Date" >= \'%s\'', $dbTableName, Convert::raw2sql($beginDate)),
                sprintf('"%s"."Date" < \'%s\'', $dbTableName, Convert::raw2sql($endDate))
            ));
        }

        // Unpaginated DataList.
        return $items;
    }