import pathlib


def get_year(image):
    """
    Get the acquisition year of the image based on the filename.

    Parameters
    ----------
    image : Path
        Path to tiff image.

    Returns
    -------
    year : str
        Acquistiion year as string.

    """
    filepath = pathlib.Path(image)
    basename = filepath.name
    year = basename[0:4]

    return year