from datetime import datetime


def fiscal_year(now=None):
    """Determine the fiscal year based on today's date."""
    if not now:
        now = datetime.now()
    if now.month >= 1 and now.month < 7:
        return now.year - 1
    return now.year