def calculate_passed_days(timestamp1, timestamp2):
    """
    Calculates the number of days between two timestamps.
    """
    if timestamp2 is None:
        return 0
    diff = timestamp1 - timestamp2
    min_sec = divmod(diff.days * 86400 + diff.seconds, 60)
    return min_sec[0] / (24 * 60)
