def add_duration_query(url, weekly=None, monthly=None):
    """Add duration according to arguments"""
    if weekly:
        url += '?since=weekly'
    elif monthly:
        url += '?since=monthly'
    return url
