def _older_than(number, unit):
    """
    Returns a query item matching messages older than a time period.

    Args:
        number (int): The number of units of time of the period.
        unit (str): The unit of time: "day", "month", or "year".

    Returns:
        The query string.

    """
    return f'older_than:{number}{unit[0]}'
