def date_specificity(date_string):
    """Detect date specificity of Zotero date string.
    
    Returns 'ymd', 'ym', or 'y' string.
    """
    length = len(date_string)
    if length == 10:
        return 'ymd'
    elif length == 7:
        return 'ym'
    elif length == 4:
        return 'y'
    return None