@staticmethod
def query_past_days(q_object, args):
    """
        Subselect to filter data nodes by their age.

        :param q_object: a query object
        :param args: a namespace with parsed command line parameters.
        """
    from aiida.common import timezone
    from django.db.models import Q
    import datetime
    if args.past_days is not None:
        now = timezone.now()
        n_days_ago = now - datetime.timedelta(days=args.past_days)
        q_object.add(Q(ctime__gte=n_days_ago), Q.AND)
