from datetime import datetime


def datetime_filter(src, fmt="%b %e, %I:%M%P"):
    """Convert a datetime into a human-readable string."""

    if isinstance(src, int):
        src = datetime.fromtimestamp(src)

    return src.strftime(fmt)