def format_date(d, if_none=''):

    if d is None:
        return if_none

    now = timezone.now()
    fmt = (d.year == now.year) and '%d.%m' or '%d.%m.%Y'
    return d.strftime(fmt)
Find the first file to match the path and ref, read the file out of git
dataset/ETHPy150Open feincms/feincms/feincms/module/extensions/datepublisher.py/format_date--crossover with--dataset/ETHPy150Open saltstack/salt/salt/utils/gitfs.py/GitFS.find_file